public interface IInventory
| Modifier and Type | Method and Description |
|---|---|
void |
closeInventory() |
ItemStack |
decrStackSize(int p_70298_1_,
int p_70298_2_)
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 p_70301_1_)
Returns the stack in slot i
|
ItemStack |
getStackInSlotOnClosing(int p_70304_1_)
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 p_94041_1_,
ItemStack p_94041_2_)
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
|
boolean |
isUseableByPlayer(EntityPlayer p_70300_1_)
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 p_70299_1_,
ItemStack p_70299_2_)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
|
int getSizeInventory()
ItemStack getStackInSlot(int p_70301_1_)
ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)
ItemStack getStackInSlotOnClosing(int p_70304_1_)
void setInventorySlotContents(int p_70299_1_,
ItemStack p_70299_2_)
java.lang.String getInventoryName()
boolean hasCustomInventoryName()
int getInventoryStackLimit()
void markDirty()
boolean isUseableByPlayer(EntityPlayer p_70300_1_)
void openInventory()
void closeInventory()
boolean isItemValidForSlot(int p_94041_1_,
ItemStack p_94041_2_)