public class TileEntityChest extends TileEntity implements IInventory
| Modifier and Type | Field and Description |
|---|---|
boolean |
adjacentChestChecked
Determines if the check for adjacent chests has taken place.
|
TileEntityChest |
adjacentChestXNeg
Contains the chest tile located adjacent to this one (if any)
|
TileEntityChest |
adjacentChestXPos
Contains the chest tile located adjacent to this one (if any)
|
TileEntityChest |
adjacentChestZNeg
Contains the chest tile located adjacent to this one (if any)
|
TileEntityChest |
adjacentChestZPos
Contains the chest tile located adjacent to this one (if any)
|
float |
lidAngle
The current angle of the lid (between 0 and 1)
|
int |
numPlayersUsing
The number of players currently using this chest
|
float |
prevLidAngle
The angle of the lid last tick
|
blockMetadata, blockType, INFINITE_EXTENT_AABB, tileEntityInvalid, worldObj, xCoord, yCoord, zCoord| Constructor and Description |
|---|
TileEntityChest() |
TileEntityChest(int p_i2350_1_) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkForAdjacentChests()
Performs the check for adjacent chests to determine if this chest is double or not.
|
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.
|
void |
func_145976_a(java.lang.String p_145976_1_) |
int |
func_145980_j() |
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
|
void |
invalidate()
invalidates a tile entity
|
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 |
openInventory() |
void |
readFromNBT(NBTTagCompound p_145839_1_) |
boolean |
receiveClientEvent(int p_145842_1_,
int p_145842_2_)
Called when a client event is received with the event number and argument, see World.sendClientEvent
|
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).
|
void |
updateContainingBlockInfo()
Causes the TileEntity to reset all it's cached values for it's container Block, metadata and in the case of
chests, the adjacent chest check
|
void |
updateEntity() |
void |
writeToNBT(NBTTagCompound p_145841_1_) |
addMapping, canUpdate, createAndLoadEntity, func_145828_a, getBlockMetadata, getBlockType, getDescriptionPacket, getDistanceFrom, getMaxRenderDistanceSquared, getRenderBoundingBox, getWorldObj, hasWorldObj, isInvalid, markDirty, onChunkUnload, onDataPacket, setWorldObj, shouldRefresh, shouldRenderInPass, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmarkDirtypublic boolean adjacentChestChecked
public TileEntityChest adjacentChestZNeg
public TileEntityChest adjacentChestXPos
public TileEntityChest adjacentChestXNeg
public TileEntityChest adjacentChestZPos
public float lidAngle
public float prevLidAngle
public int numPlayersUsing
public TileEntityChest()
public TileEntityChest(int p_i2350_1_)
public int getSizeInventory()
getSizeInventory in interface IInventorypublic ItemStack getStackInSlot(int p_70301_1_)
getStackInSlot in interface IInventorypublic ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)
decrStackSize in interface IInventorypublic ItemStack getStackInSlotOnClosing(int p_70304_1_)
getStackInSlotOnClosing in interface IInventorypublic void setInventorySlotContents(int p_70299_1_,
ItemStack p_70299_2_)
setInventorySlotContents in interface IInventorypublic java.lang.String getInventoryName()
getInventoryName in interface IInventorypublic boolean hasCustomInventoryName()
hasCustomInventoryName in interface IInventorypublic void func_145976_a(java.lang.String p_145976_1_)
public void readFromNBT(NBTTagCompound p_145839_1_)
readFromNBT in class TileEntitypublic void writeToNBT(NBTTagCompound p_145841_1_)
writeToNBT in class TileEntitypublic int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic boolean isUseableByPlayer(EntityPlayer p_70300_1_)
isUseableByPlayer in interface IInventorypublic void updateContainingBlockInfo()
updateContainingBlockInfo in class TileEntitypublic void checkForAdjacentChests()
public void updateEntity()
updateEntity in class TileEntitypublic boolean receiveClientEvent(int p_145842_1_,
int p_145842_2_)
receiveClientEvent in class TileEntitypublic 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 IInventorypublic void invalidate()
invalidate in class TileEntitypublic int func_145980_j()