diff options
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)); + } + +} |
