ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/CompatFastBench.java

28 lines
865 B
Java
Raw Normal View History

2018-03-07 03:08:25 +01:00
package de.ellpeck.actuallyadditions.mod.util.compat;
import net.minecraft.client.gui.Gui;
2021-02-26 22:15:48 +01:00
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.Container;
2018-03-07 03:08:25 +01:00
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import shadows.fastbench.gui.ContainerFastBench;
import shadows.fastbench.gui.GuiFastBench;
public class CompatFastBench {
2021-02-26 22:15:48 +01:00
public static Container getFastBenchContainer(PlayerEntity p, World world) {
2019-02-27 19:53:05 +01:00
return new ContainerFastBench(p, world, BlockPos.ORIGIN) {
@Override
2021-02-26 22:15:48 +01:00
public boolean canInteractWith(PlayerEntity playerIn) {
2019-02-27 19:53:05 +01:00
return true;
}
};
}
2018-03-07 03:08:25 +01:00
2021-02-26 22:15:48 +01:00
@OnlyIn(Dist.CLIENT)
public static Gui getFastBenchGui(PlayerEntity p, World world) {
2019-02-27 19:53:05 +01:00
return new GuiFastBench(p.inventory, world, BlockPos.ORIGIN);
}
2018-03-07 03:08:25 +01:00
}