From 44f9836bd1542e381f8fd0a57c76d7a4b2f0008a Mon Sep 17 00:00:00 2001 From: Lance5057 Date: Wed, 25 Feb 2015 03:30:35 -0600 Subject: Crest Mount finally stores items properly! --- src/main/java/gmail/Lance5057/proxy/ClientProxy.java | 6 ------ src/main/java/gmail/Lance5057/proxy/CommonProxy.java | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'src/main/java/gmail/Lance5057/proxy') diff --git a/src/main/java/gmail/Lance5057/proxy/ClientProxy.java b/src/main/java/gmail/Lance5057/proxy/ClientProxy.java index c3c6afe..90e883c 100644 --- a/src/main/java/gmail/Lance5057/proxy/ClientProxy.java +++ b/src/main/java/gmail/Lance5057/proxy/ClientProxy.java @@ -35,10 +35,4 @@ public class ClientProxy extends CommonProxy } return tutChest; //default, if whenever you should have passed on a wrong id } - - @Override - public EntityPlayer getPlayerEntity(MessageContext ctx) - { - return (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer : super.getPlayerEntity(ctx)); - } } \ No newline at end of file diff --git a/src/main/java/gmail/Lance5057/proxy/CommonProxy.java b/src/main/java/gmail/Lance5057/proxy/CommonProxy.java index 3f82087..4fbfd93 100644 --- a/src/main/java/gmail/Lance5057/proxy/CommonProxy.java +++ b/src/main/java/gmail/Lance5057/proxy/CommonProxy.java @@ -43,7 +43,7 @@ public class CommonProxy implements IGuiHandler { if (ID == mod_TinkersDefense.GUI_ITEM_INV) { // Use the player's held item to create the inventory - return new Container_CrestMount(player, player.inventory, new TileEntity_CrestMount()); + return new Container_CrestMount(player.inventory, (TileEntity_CrestMount)world.getTileEntity(x, y, z)); } return null; } @@ -55,8 +55,8 @@ public class CommonProxy implements IGuiHandler { if (ID == mod_TinkersDefense.GUI_ITEM_INV) { // We have to cast the new container as our custom class - // and pass in currently held item for the inventory - return new Gui_CrestMount((Container_CrestMount) new Container_CrestMount(player, player.inventory, new TileEntity_CrestMount())); + + return new Gui_CrestMount(player.inventory, (TileEntity_CrestMount)world.getTileEntity(x, y, z)); } return null; } -- cgit v1.2.3