diff options
| author | Lance5057 <Lance5057@gmail.com> | 2015-02-25 03:30:35 -0600 |
|---|---|---|
| committer | Lance5057 <Lance5057@gmail.com> | 2015-02-25 03:30:35 -0600 |
| commit | 44f9836bd1542e381f8fd0a57c76d7a4b2f0008a (patch) | |
| tree | a33601a9097e517a8eca3ff63ae4a9ddb8bccee8 /src/main/java/gmail/Lance5057/proxy | |
| parent | 11e81b501260a94bff6dac0cc699f6928c8fbb52 (diff) | |
Crest Mount finally stores items properly!
Diffstat (limited to 'src/main/java/gmail/Lance5057/proxy')
| -rw-r--r-- | src/main/java/gmail/Lance5057/proxy/ClientProxy.java | 6 | ||||
| -rw-r--r-- | src/main/java/gmail/Lance5057/proxy/CommonProxy.java | 6 |
2 files changed, 3 insertions, 9 deletions
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; } |
