Jump to content

Recommended Posts

Posted

Hi!

I want to set programically item in slot to null or itemstack. But using setInventorySlotContents don't do his work.

There's that method:

	@Override
public void setInventorySlotContents(int var1, ItemStack var2)
{
        if (var1 >= 0 && var1 < this.inventory.length)
        {
            this.inventory[var1] = var2;
        }
        
	if (var2 != null && var2.stackSize > this.getInventoryStackLimit())
	{
		var2.stackSize = this.getInventoryStackLimit();
	}
        this.markDirty();
}

Posted

Where do you use .setInventorySlotContents(int slot, ItemStack itemstack) ?

Yes. I know. I have a bad english. Sorry, but hey, I'm still alive! ;)

Posted

Can anyone help me?

 

@up

The method works but value isn't saving (when drawing the changed item in slot, the previous item shows).

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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