Package net.minecraft.tileentity
Class LockableTileEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
net.minecraft.tileentity.TileEntity
net.minecraft.tileentity.LockableTileEntity
- All Implemented Interfaces:
IContainerProvider
,INamedContainerProvider
,IClearable
,IInventory
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
- Direct Known Subclasses:
AbstractFurnaceTileEntity
,BrewingStandTileEntity
,LockableLootTileEntity
public abstract class LockableTileEntity
extends TileEntity
implements IInventory, INamedContainerProvider, INameable
-
Field Summary
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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 p_213906_1_, PlayerInventory p_213906_2_) createMenu
(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_) protected IItemHandler
<T> LazyOptional<T>
getCapability
(Capability<T> cap, Direction side) Retrieves the Optional handler for the capability requested on the specific side.protected abstract ITextComponent
getName()
protected void
void
load
(BlockState p_230337_1_, CompoundNBT p_230337_2_) save
(CompoundNBT p_189515_1_) void
setCustomName
(ITextComponent p_213903_1_) Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
Methods inherited from interface net.minecraft.inventory.IClearable
clearContent
Methods inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
Methods inherited from interface net.minecraft.inventory.IInventory
canPlaceItem, countItem, getContainerSize, getItem, getMaxStackSize, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpen
Methods inherited from interface net.minecraft.util.INameable
hasCustomName
-
Field Details
-
lockKey
-
name
-
itemHandler
-
-
Constructor Details
-
LockableTileEntity
-
-
Method Details
-
load
- Overrides:
load
in classTileEntity
-
save
- Overrides:
save
in classTileEntity
-
setCustomName
-
getName
-
getDisplayName
- Specified by:
getDisplayName
in interfaceINameable
- Specified by:
getDisplayName
in interfaceINamedContainerProvider
-
getCustomName
- Specified by:
getCustomName
in interfaceINameable
-
getDefaultName
-
canOpen
-
canUnlock
public static boolean canUnlock(PlayerEntity p_213905_0_, LockCode p_213905_1_, ITextComponent p_213905_2_) -
createMenu
@Nullable public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_) - Specified by:
createMenu
in interfaceIContainerProvider
-
createMenu
-
createUnSidedHandler
-
getCapability
Description copied from interface:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
getCapability
in interfaceICapabilityProvider
- Overrides:
getCapability
in classCapabilityProvider<TileEntity>
- Returns:
- The requested an optional holding the requested capability.
-
invalidateCaps
protected void invalidateCaps()- Overrides:
invalidateCaps
in classCapabilityProvider<TileEntity>
-