public class TileEntityChest extends TileEntityLockableLoot implements ITickable
Modifier and Type | Field and Description |
---|---|
boolean |
adjacentChestChecked |
TileEntityChest |
adjacentChestXNeg |
TileEntityChest |
adjacentChestXPos |
TileEntityChest |
adjacentChestZNeg |
TileEntityChest |
adjacentChestZPos |
private BlockChest.Type |
cachedChestType |
private NonNullList<ItemStack> |
chestContents |
VanillaDoubleChestItemHandler |
doubleChestHandler |
float |
lidAngle |
int |
numPlayersUsing |
float |
prevLidAngle |
private int |
ticksSinceSync |
customName, lootTable, lootTableSeed
blockType, INFINITE_EXTENT_AABB, pos, tileEntityInvalid, world
Constructor and Description |
---|
TileEntityChest() |
TileEntityChest(BlockChest.Type typeIn) |
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, register, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRefresh, shouldRenderInPass, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
markDirty
private NonNullList<ItemStack> chestContents
public boolean adjacentChestChecked
public TileEntityChest adjacentChestZNeg
public TileEntityChest adjacentChestXPos
public TileEntityChest adjacentChestXNeg
public TileEntityChest adjacentChestZPos
public float lidAngle
public float prevLidAngle
public int numPlayersUsing
private int ticksSinceSync
private BlockChest.Type cachedChestType
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
private void setNeighbor(TileEntityChest chestTe, EnumFacing side)
public void checkForAdjacentChests()
@Nullable protected TileEntityChest getAdjacentChest(EnumFacing side)
private boolean isChestAt(BlockPos posIn)
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
@Nullable public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
ICapabilityProvider
Basically, this method functions analogously to Map.get(Object)
.
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 true.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