Jump to content

[1.7.10]Item disappears when removing it from slot. (SlotFurnace)


Recommended Posts

Posted

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]

Posted

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.

Posted

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]

Posted

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]

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.