public class InventoryCrafting extends java.lang.Object implements IInventory
| Constructor and Description |
|---|
InventoryCrafting(Container p_i1807_1_,
int p_i1807_2_,
int p_i1807_3_) |
| 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 |
getStackInRowAndColumn(int p_70463_1_,
int p_70463_2_)
Returns the itemstack in the slot specified (Top left is 0, 0).
|
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).
|
public InventoryCrafting(Container p_i1807_1_, int p_i1807_2_, int p_i1807_3_)
public int getSizeInventory()
getSizeInventory in interface IInventorypublic ItemStack getStackInSlot(int p_70301_1_)
getStackInSlot in interface IInventorypublic ItemStack getStackInRowAndColumn(int p_70463_1_, int p_70463_2_)
public java.lang.String getInventoryName()
getInventoryName in interface IInventorypublic boolean hasCustomInventoryName()
hasCustomInventoryName in interface IInventorypublic ItemStack getStackInSlotOnClosing(int p_70304_1_)
getStackInSlotOnClosing in interface IInventorypublic ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)
decrStackSize in interface IInventorypublic void setInventorySlotContents(int p_70299_1_,
ItemStack p_70299_2_)
setInventorySlotContents in interface IInventorypublic int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic void markDirty()
markDirty in interface IInventorypublic boolean isUseableByPlayer(EntityPlayer p_70300_1_)
isUseableByPlayer in interface IInventorypublic void openInventory()
openInventory in interface IInventorypublic void closeInventory()
closeInventory in interface IInventorypublic boolean isItemValidForSlot(int p_94041_1_,
ItemStack p_94041_2_)
isItemValidForSlot in interface IInventory