public class NBTSimpleInventoryItemHeld extends SimpleInventory
| Modifier and Type | Field and Description |
|---|---|
protected int |
itemIndex |
static java.lang.String |
NBT_TAG_ROOT |
protected net.minecraft.entity.player.EntityPlayer |
player |
| Constructor and Description |
|---|
NBTSimpleInventoryItemHeld(net.minecraft.entity.player.EntityPlayer player,
int itemIndex,
int size,
int stackLimit)
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
markDirty() |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound data,
java.lang.String tagName)
Read inventory data from the given NBT.
|
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound data,
java.lang.String tagName)
Write inventory data to the given NBT.
|
closeInventory, decrStackSize, getInventoryName, getInventoryStackLimit, getItemStacks, getSizeInventory, getStackInSlot, getStackInSlotOnClosing, hasCustomInventoryName, isItemValidForSlot, isUseableByPlayer, openInventory, readFromNBT, setInventorySlotContents, writeToNBTpublic static final java.lang.String NBT_TAG_ROOT
protected net.minecraft.entity.player.EntityPlayer player
protected int itemIndex
public NBTSimpleInventoryItemHeld(net.minecraft.entity.player.EntityPlayer player,
int itemIndex,
int size,
int stackLimit)
player - The player holding the item.itemIndex - The index of the item in use inside the player inventory.size - The amount of slots in the inventory.stackLimit - The stack limit for each slot.public void markDirty()
markDirty in interface net.minecraft.inventory.IInventorymarkDirty in class SimpleInventorypublic void readFromNBT(net.minecraft.nbt.NBTTagCompound data,
java.lang.String tagName)
SimpleInventoryreadFromNBT in class SimpleInventorydata - The NBT data containing inventory data.tagName - The NBT tag name where the info is located.public void writeToNBT(net.minecraft.nbt.NBTTagCompound data,
java.lang.String tagName)
SimpleInventorywriteToNBT in class SimpleInventorydata - The NBT tag that will receive inventory data.tagName - The NBT tag name where the info must be located.