Posted April 20, 201510 yr When I use setInventorySlotContents to set a slot to an item the item disappears when removing it from the slot. @Override public void setInventorySlotContents(int var1, ItemStack var2) { this.slots[var1] = var2; if(var2 != null && var2.stackSize > this.getInventoryStackLimit()) { var2.stackSize = this.getInventoryStackLimit(); } } Legend of Zelda Mod[updated September 20th to 3.1.1] Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0] Fancy Cheeses[updated May 8th to 0.5.0]
April 20, 201510 yr You are chainging slot contents client-side. Make sure to do that on server, it's the server that holds data, client is only a vessel. 1.7.10 is no longer supported by forge, you are on your own.
April 20, 201510 yr Author You are chainging slot contents client-side. Make sure to do that on server, it's the server that holds data, client is only a vessel. What methods do I need to change it server-side? Legend of Zelda Mod[updated September 20th to 3.1.1] Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0] Fancy Cheeses[updated May 8th to 0.5.0]
April 20, 201510 yr Where are you calling your changes? That is the key. 1.7.10 is no longer supported by forge, you are on your own.
April 20, 201510 yr Author Where are you calling your changes? That is the key. The function is being called when a button on the GUI is pressed. Legend of Zelda Mod[updated September 20th to 3.1.1] Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0] Fancy Cheeses[updated May 8th to 0.5.0]
April 20, 201510 yr That is obviously the problem. Gui's are client-side, server doesn't know about them. You will need to send packet from client to server on button click that will tell server to change your eq. http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-2-customizing-packet-handling-with 1.7.10 is no longer supported by forge, you are on your own.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.