public interface IInventory
Modifier and Type | Method and Description |
---|---|
void |
closeInventory() |
ItemStack |
decrStackSize(int var1,
int var2)
Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
new stack.
|
java.lang.String |
getInventoryName()
Returns the name of the inventory
|
int |
getInventoryStackLimit()
Returns the maximum stack size for a inventory slot.
|
int |
getSizeInventory()
Returns the number of slots in the inventory.
|
ItemStack |
getStackInSlot(int var1)
Returns the stack in slot i
|
ItemStack |
getStackInSlotOnClosing(int var1)
When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
like when you close a workbench GUI.
|
boolean |
hasCustomInventoryName()
Returns if the inventory is named
|
boolean |
isItemValidForSlot(int var1,
ItemStack var2)
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
|
boolean |
isUseableByPlayer(EntityPlayer var1)
Do not make give this method the name canInteractWith because it clashes with Container
|
void |
markDirty()
For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think it
hasn't changed and skip it.
|
void |
openInventory() |
void |
setInventorySlotContents(int var1,
ItemStack var2)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
|
int getSizeInventory()
ItemStack getStackInSlot(int var1)
ItemStack decrStackSize(int var1, int var2)
ItemStack getStackInSlotOnClosing(int var1)
void setInventorySlotContents(int var1, ItemStack var2)
java.lang.String getInventoryName()
boolean hasCustomInventoryName()
int getInventoryStackLimit()
void markDirty()
boolean isUseableByPlayer(EntityPlayer var1)
void openInventory()
void closeInventory()
boolean isItemValidForSlot(int var1, ItemStack var2)