mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Fixes #1051
This commit is contained in:
parent
349640c07f
commit
3fcebcdd05
2 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import shadows.fastbench.gui.ContainerFastBench;
|
||||
import shadows.fastbench.gui.GuiFastBench;
|
||||
|
||||
|
@ -19,6 +21,7 @@ public class CompatFastBench {
|
|||
};
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static Gui getFastBenchGui(EntityPlayer p, World world, int x, int y, int z) {
|
||||
return new GuiFastBench(p.inventory, world, new BlockPos(x, y, z));
|
||||
}
|
||||
|
|
|
@ -16,11 +16,14 @@ import net.minecraft.inventory.ContainerWorkbench;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public final class CompatUtil {
|
||||
|
||||
static boolean fb = Loader.isModLoaded("fastbench");
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static Object getCrafterGuiElement(EntityPlayer player, World world, int x, int y, int z) {
|
||||
if (fb) return CompatFastBench.getFastBenchGui(player, world, x, y, z);
|
||||
return new GuiCrafting(player.inventory, world, new BlockPos(x, y, z));
|
||||
|
|
Loading…
Reference in a new issue