public abstract class LockableTileEntity extends TileEntity implements IInventory, INamedContainerProvider, INameable
Modifier and Type | Field and Description |
---|---|
private LockCode |
code |
private ITextComponent |
customName |
private LazyOptional<?> |
itemHandler |
pos, removed, world
INFINITE_EXTENT_AABB
Modifier | Constructor and Description |
---|---|
protected |
LockableTileEntity(TileEntityType<?> typeIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
canOpen(PlayerEntity p_213904_1_) |
static boolean |
canUnlock(PlayerEntity p_213905_0_,
LockCode p_213905_1_,
ITextComponent p_213905_2_) |
protected abstract Container |
createMenu(int id,
PlayerInventory player) |
Container |
createMenu(int p_createMenu_1_,
PlayerInventory p_createMenu_2_,
PlayerEntity p_createMenu_3_) |
protected IItemHandler |
createUnSidedHandler() |
<T> LazyOptional<T> |
getCapability(Capability<T> cap,
Direction side)
Retrieves the Optional handler for the capability requested on the specific side.
|
ITextComponent |
getCustomName() |
protected abstract ITextComponent |
getDefaultName() |
ITextComponent |
getDisplayName() |
ITextComponent |
getName() |
void |
read(CompoundNBT compound) |
void |
remove() |
void |
setCustomName(ITextComponent name) |
CompoundNBT |
write(CompoundNBT compound) |
addInfoToCrashReport, create, getBlockState, getDistanceSq, getMaxRenderDistanceSquared, getPos, getTileData, getType, getUpdatePacket, getUpdateTag, getWorld, hasWorld, isRemoved, markDirty, mirror, onlyOpsCanSetNbt, receiveClientEvent, rotate, setPos, setWorldAndPos, updateContainingBlockInfo, validate, warnInvalidBlock
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeInventory, count, decrStackSize, getInventoryStackLimit, getSizeInventory, getStackInSlot, hasAny, isEmpty, isItemValidForSlot, isUsableByPlayer, markDirty, openInventory, removeStackFromSlot, setInventorySlotContents
clear, clearObj
hasCustomName
canRenderBreaking, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, hasFastRenderer, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
getCapability
private LockCode code
private ITextComponent customName
private LazyOptional<?> itemHandler
protected LockableTileEntity(TileEntityType<?> typeIn)
public void read(CompoundNBT compound)
read
in class TileEntity
public CompoundNBT write(CompoundNBT compound)
write
in class TileEntity
public void setCustomName(ITextComponent name)
public ITextComponent getName()
public ITextComponent getDisplayName()
getDisplayName
in interface INamedContainerProvider
getDisplayName
in interface INameable
@Nullable public ITextComponent getCustomName()
getCustomName
in interface INameable
protected abstract ITextComponent getDefaultName()
public boolean canOpen(PlayerEntity p_213904_1_)
public static boolean canUnlock(PlayerEntity p_213905_0_, LockCode p_213905_1_, ITextComponent p_213905_2_)
@Nullable public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_)
createMenu
in interface IContainerProvider
protected abstract Container createMenu(int id, PlayerInventory player)
protected IItemHandler createUnSidedHandler()
@Nullable public <T> LazyOptional<T> getCapability(Capability<T> cap, @Nullable Direction side)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class CapabilityProvider<TileEntity>
public void remove()
remove
in class TileEntity