Hey, I'm having trouble with my custom chest. What I want is to make it so that the player can only hold 6 certain items (from my mod) in the chest. I already have the chest created and working and all that. I heard that you can restrict items from being put into containers with the "isStackValidForSlot" thing.
public boolean isStackValidForSlot(int par1, ItemStack par2ItemStack)
{
return true;
}
I just don't know what to put in to make it restrict all but those 6 items in those slots.
I just don't know what to put in to make it restrict all but those 6 items in those slots.
Then you can add valid items for the slot with YourTileEntity.validItems.add(item)