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

30 lines
976 B
Java
Raw Normal View History

package de.ellpeck.actuallyadditions.common.util.compat;
2018-03-07 03:08:25 +01:00
2020-09-09 17:57:31 +02:00
import net.minecraft.client.gui.screen.Screen;
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;
2020-09-09 17:57:31 +02:00
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
2018-03-07 03:08:25 +01:00
import shadows.fastbench.gui.ContainerFastBench;
import shadows.fastbench.gui.GuiFastBench;
public class CompatFastBench {
2020-09-09 17:57:31 +02:00
public static Container getFastBenchContainer(PlayerEntity p, World world) {
return new ContainerFastBench(0, p, world, BlockPos.ZERO) {
2019-02-27 19:53:05 +01:00
@Override
2020-09-09 17:57:31 +02:00
public boolean canInteractWith(PlayerEntity playerIn) {
2019-02-27 19:53:05 +01:00
return true;
}
};
}
2018-03-07 03:08:25 +01:00
2020-09-09 17:57:31 +02:00
@OnlyIn(Dist.CLIENT)
public static Screen getFastBenchGui(PlayerEntity p, World world) {
return new GuiFastBench(p.inventory, world, BlockPos.ZERO);
2020-09-09 16:49:01 +02:00
}
}