diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-26 00:50:16 +0200 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-26 00:50:16 +0200 |
| commit | 1a3455b24d90b0def912c28467cbc51662d660e0 (patch) | |
| tree | 90232ffe1b1a52ab43594b438cfac44ad3c0b60e /common/darkknight/jewelrycraft/container/GuiHandler.java | |
| parent | 1997f4547812121223836dcacfcb31ea63acdda6 (diff) | |
Major changes. Thanks domi for helping me with the chest linking ring :)
Diffstat (limited to 'common/darkknight/jewelrycraft/container/GuiHandler.java')
| -rw-r--r-- | common/darkknight/jewelrycraft/container/GuiHandler.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/common/darkknight/jewelrycraft/container/GuiHandler.java b/common/darkknight/jewelrycraft/container/GuiHandler.java new file mode 100644 index 0000000..a0afc3f --- /dev/null +++ b/common/darkknight/jewelrycraft/container/GuiHandler.java @@ -0,0 +1,30 @@ +package darkknight.jewelrycraft.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.world.World; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import darkknight.jewelrycraft.JewelrycraftMod; +import darkknight.jewelrycraft.client.GuiRingChest; + +public class GuiHandler implements IGuiHandler +{ + public GuiHandler() + { + NetworkRegistry.instance().registerGuiHandler(JewelrycraftMod.instance, this); + } + + @Override + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) + { + return new ContainerRingChest(player.inventory, (TileEntityChest) world.getBlockTileEntity(x, y, z)); + } + + @Override + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) + { + return new GuiRingChest((ContainerRingChest) getServerGuiElement(ID, player, world, x, y, z)); + } + +} |
