public class TileEntityChest extends TileEntityLockableLoot implements ITickable
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)
|
VanillaDoubleChestItemHandler |
doubleChestHandler |
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
|
customName, lootTable, lootTableSeed
blockType, INFINITE_EXTENT_AABB, pos, tileEntityInvalid, world
Constructor and Description |
---|
TileEntityChest() |
TileEntityChest(BlockChest.Type typeIn) |
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(EntityPlayer player) |
Container |
createContainer(InventoryPlayer playerInventory,
EntityPlayer playerIn) |
protected TileEntityChest |
getAdjacentChest(EnumFacing side) |
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
BlockChest.Type |
getChestType() |
java.lang.String |
getGuiID() |
int |
getInventoryStackLimit()
Returns the maximum stack size for a inventory slot.
|
protected NonNullList<ItemStack> |
getItems() |
java.lang.String |
getName()
Get the name of this object.
|
IItemHandler |
getSingleChestHandler() |
int |
getSizeInventory()
Returns the number of slots in the inventory.
|
void |
invalidate()
invalidates a tile entity
|
boolean |
isEmpty() |
void |
openInventory(EntityPlayer player) |
void |
readFromNBT(NBTTagCompound compound) |
boolean |
receiveClientEvent(int id,
int type) |
static void |
registerFixesChest(DataFixer fixer) |
void |
update()
Like the old updateEntity(), except more generic.
|
void |
updateContainingBlockInfo() |
NBTTagCompound |
writeToNBT(NBTTagCompound compound) |
checkLootAndRead, checkLootAndWrite, clear, decrStackSize, fillWithLoot, getField, getFieldCount, getLootTable, getStackInSlot, hasCustomName, isItemValidForSlot, isUsableByPlayer, removeStackFromSlot, setCustomName, setField, setInventorySlotContents, setLootTable
createUnSidedHandler, getDisplayName, getLockCode, hasCapability, isLocked, setLockCode
addInfoToCrashReport, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getDistanceSq, getKey, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getUpdatePacket, getUpdateTag, getWorld, handleUpdateTag, hasFastRenderer, hasWorld, isInvalid, markDirty, mirror, onChunkUnload, onDataPacket, onLoad, onlyOpsCanSetNbt, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRefresh, shouldRenderInPass, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
markDirty
public boolean adjacentChestChecked
public TileEntityChest adjacentChestZNeg
public TileEntityChest adjacentChestXPos
public TileEntityChest adjacentChestXNeg
public TileEntityChest adjacentChestZPos
public float lidAngle
public float prevLidAngle
public int numPlayersUsing
public VanillaDoubleChestItemHandler doubleChestHandler
public TileEntityChest()
public TileEntityChest(BlockChest.Type typeIn)
public int getSizeInventory()
getSizeInventory
in interface IInventory
public boolean isEmpty()
isEmpty
in interface IInventory
public java.lang.String getName()
getName
in interface IWorldNameable
public static void registerFixesChest(DataFixer fixer)
public void readFromNBT(NBTTagCompound compound)
readFromNBT
in class TileEntityLockable
public NBTTagCompound writeToNBT(NBTTagCompound compound)
writeToNBT
in class TileEntityLockable
public int getInventoryStackLimit()
getInventoryStackLimit
in interface IInventory
public void updateContainingBlockInfo()
updateContainingBlockInfo
in class TileEntity
public void checkForAdjacentChests()
protected TileEntityChest getAdjacentChest(EnumFacing side)
public void update()
public boolean receiveClientEvent(int id, int type)
receiveClientEvent
in class TileEntity
public void openInventory(EntityPlayer player)
openInventory
in interface IInventory
openInventory
in class TileEntityLockableLoot
public void closeInventory(EntityPlayer player)
closeInventory
in interface IInventory
closeInventory
in class TileEntityLockableLoot
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class TileEntityLockable
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'ICapabilityProvider.hasCapability(Capability, EnumFacing)
would return false.public IItemHandler getSingleChestHandler()
public void invalidate()
invalidate
in class TileEntity
public BlockChest.Type getChestType()
public java.lang.String getGuiID()
getGuiID
in interface IInteractionObject
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
createContainer
in interface IInteractionObject
protected NonNullList<ItemStack> getItems()
getItems
in class TileEntityLockableLoot