public class Inventory
extends java.lang.Object
implements net.minecraft.inventory.IInventory
| Modifier and Type | Field and Description |
|---|---|
protected net.minecraft.item.ItemStack[] |
items |
| Constructor and Description |
|---|
Inventory(java.lang.String name,
int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeInventory() |
net.minecraft.item.ItemStack |
decrStackSize(int index,
int count) |
java.lang.String |
getInventoryName() |
int |
getInventoryStackLimit() |
int |
getSizeInventory() |
net.minecraft.item.ItemStack |
getStackInSlot(int index) |
net.minecraft.item.ItemStack |
getStackInSlotOnClosing(int index) |
boolean |
hasCustomInventoryName() |
boolean |
isItemValidForSlot(int index,
net.minecraft.item.ItemStack stack) |
boolean |
isUseableByPlayer(net.minecraft.entity.player.EntityPlayer player) |
void |
markDirty() |
protected void |
onItemAdded(int index) |
protected void |
onItemRemoved(int index) |
void |
openInventory() |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
void |
setInventorySlotContents(int index,
net.minecraft.item.ItemStack stack) |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
public void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
public void writeToNBT(net.minecraft.nbt.NBTTagCompound nbt)
protected void onItemAdded(int index)
protected void onItemRemoved(int index)
public java.lang.String getInventoryName()
getInventoryName in interface net.minecraft.inventory.IInventorypublic boolean hasCustomInventoryName()
hasCustomInventoryName in interface net.minecraft.inventory.IInventorypublic int getSizeInventory()
getSizeInventory in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack getStackInSlot(int index)
getStackInSlot in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack decrStackSize(int index,
int count)
decrStackSize in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack getStackInSlotOnClosing(int index)
getStackInSlotOnClosing in interface net.minecraft.inventory.IInventorypublic void setInventorySlotContents(int index,
net.minecraft.item.ItemStack stack)
setInventorySlotContents in interface net.minecraft.inventory.IInventorypublic int getInventoryStackLimit()
getInventoryStackLimit in interface net.minecraft.inventory.IInventorypublic void markDirty()
markDirty in interface net.minecraft.inventory.IInventorypublic boolean isUseableByPlayer(net.minecraft.entity.player.EntityPlayer player)
isUseableByPlayer in interface net.minecraft.inventory.IInventorypublic void openInventory()
openInventory in interface net.minecraft.inventory.IInventorypublic void closeInventory()
closeInventory in interface net.minecraft.inventory.IInventorypublic boolean isItemValidForSlot(int index,
net.minecraft.item.ItemStack stack)
isItemValidForSlot in interface net.minecraft.inventory.IInventory