public abstract class TileEntityLockable extends TileEntity implements ILockableContainer
blockType, INFINITE_EXTENT_AABB, pos, tileEntityInvalid, world
Constructor and Description |
---|
TileEntityLockable() |
Modifier and Type | Method and Description |
---|---|
protected IItemHandler |
createUnSidedHandler() |
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
ITextComponent |
getDisplayName() |
LockCode |
getLockCode() |
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Determines if this object has support for the capability in question on the specific side.
|
boolean |
isLocked() |
void |
readFromNBT(NBTTagCompound compound) |
void |
setLockCode(LockCode code) |
NBTTagCompound |
writeToNBT(NBTTagCompound compound) |
addInfoToCrashReport, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getDistanceSq, getKey, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getUpdatePacket, getUpdateTag, getWorld, handleUpdateTag, hasFastRenderer, hasWorld, invalidate, isInvalid, markDirty, mirror, onChunkUnload, onDataPacket, onLoad, onlyOpsCanSetNbt, receiveClientEvent, register, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, closeInventory, decrStackSize, getField, getFieldCount, getInventoryStackLimit, getSizeInventory, getStackInSlot, isEmpty, isItemValidForSlot, isUsableByPlayer, markDirty, openInventory, removeStackFromSlot, setField, setInventorySlotContents
createContainer, getGuiID
getName, hasCustomName
public void readFromNBT(NBTTagCompound compound)
readFromNBT
in class TileEntity
public NBTTagCompound writeToNBT(NBTTagCompound compound)
writeToNBT
in class TileEntity
public boolean isLocked()
isLocked
in interface ILockableContainer
public LockCode getLockCode()
getLockCode
in interface ILockableContainer
public void setLockCode(LockCode code)
setLockCode
in interface ILockableContainer
public ITextComponent getDisplayName()
getDisplayName
in interface IWorldNameable
getDisplayName
in class TileEntity
protected IItemHandler createUnSidedHandler()
@Nullable public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class TileEntity
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 boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing)
ICapabilityProvider
hasCapability
in interface ICapabilityProvider
hasCapability
in class TileEntity
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'