Class LockableContainerBlockEntity
- All Implemented Interfaces:
- Inventory,- NamedScreenHandlerFactory,- ScreenHandlerFactory,- Clearable,- Nameable
- Direct Known Subclasses:
- AbstractFurnaceBlockEntity,- BrewingStandBlockEntity,- LootableContainerBlockEntity
- Mappings:
- Namespace - Name - official - czh- intermediary - net/minecraft/class_2624- named - net/minecraft/block/entity/LockableContainerBlockEntity
- 
Field SummaryFieldsFields inherited from class net.minecraft.block.entity.BlockEntitypos, removed, worldFields inherited from interface net.minecraft.inventory.Inventoryfield_42619, MAX_COUNT_PER_STACK
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedLockableContainerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleancheckUnlocked(PlayerEntity player) static booleancheckUnlocked(PlayerEntity player, ContainerLock lock, Text containerName) createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player) protected abstract ScreenHandlercreateScreenHandler(int syncId, PlayerInventory playerInventory) protected abstract TextReturns the custom name of this object, ornullif there is none.Returns the title of this screen handler; will be a part of the open screen packet sent to the client.getName()Returns the name of this object.voidreadNbt(NbtCompound nbt) Reads data fromnbt.voidsetCustomName(Text customName) protected voidwriteNbt(NbtCompound nbt) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntitycancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, toInitialChunkDataNbt, toUpdatePacket, writeIdToNbtMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.InventorycanPlayerUse, canTransferTo, containsAny, containsAny, count, getMaxCountPerStack, getStack, isEmpty, isValid, markDirty, onClose, onOpen, removeStack, removeStack, setStack, sizeMethods inherited from interface net.minecraft.util.NameablehasCustomName
- 
Field Details- 
lock- Mappings:
- Namespace - Name - Mixin selector - official - c- Lczh;c:Lbdz;- intermediary - field_12045- Lnet/minecraft/class_2624;field_12045:Lnet/minecraft/class_1273;- named - lock- Lnet/minecraft/block/entity/LockableContainerBlockEntity;lock:Lnet/minecraft/inventory/ContainerLock;
 
- 
customName- Mappings:
- Namespace - Name - Mixin selector - official - d- Lczh;d:Lsw;- intermediary - field_17376- Lnet/minecraft/class_2624;field_17376:Lnet/minecraft/class_2561;- named - customName- Lnet/minecraft/block/entity/LockableContainerBlockEntity;customName:Lnet/minecraft/text/Text;
 
 
- 
- 
Constructor Details- 
LockableContainerBlockEntity- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lczn;<init>(Lczp;Lgu;Ldcb;)V- intermediary - <init>- Lnet/minecraft/class_2586;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V- named - <init>- Lnet/minecraft/block/entity/BlockEntity;<init>(Lnet/minecraft/block/entity/BlockEntityType;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
 
 
- 
- 
Method Details- 
readNbtReads data fromnbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity. nbtmight not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
- readNbtin class- BlockEntity
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lczn;a(Lqr;)V- intermediary - method_11014- Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)V- named - readNbt- Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
 
- 
writeNbtWrites data tonbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity. - Overrides:
- writeNbtin class- BlockEntity
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lczn;b(Lqr;)V- intermediary - method_11007- Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)V- named - writeNbt- Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
 
- 
setCustomName- Mappings:
- Namespace - Name - Mixin selector - official - a- Lczh;a(Lsw;)V- intermediary - method_17488- Lnet/minecraft/class_2624;method_17488(Lnet/minecraft/class_2561;)V- named - setCustomName- Lnet/minecraft/block/entity/LockableContainerBlockEntity;setCustomName(Lnet/minecraft/text/Text;)V
 
- 
getNameReturns the name of this object.This should return the custom name if it exists, otherwise the default name. This should not have styling applied. - Specified by:
- getNamein interface- Nameable
- Returns:
- the name of this object
- Mappings:
- Namespace - Name - Mixin selector - official - Z- Lbeb;Z()Lsw;- intermediary - method_5477- Lnet/minecraft/class_1275;method_5477()Lnet/minecraft/class_2561;- named - getName- Lnet/minecraft/util/Nameable;getName()Lnet/minecraft/text/Text;
 
- 
getDisplayNameReturns the title of this screen handler; will be a part of the open screen packet sent to the client.- Specified by:
- getDisplayNamein interface- Nameable
- Specified by:
- getDisplayNamein interface- NamedScreenHandlerFactory
- Returns:
- the display name of this object
- Mappings:
- Namespace - Name - Mixin selector - official - H_- Lbea;H_()Lsw;- intermediary - method_5476- Lnet/minecraft/class_3908;method_5476()Lnet/minecraft/class_2561;- named - getDisplayName- Lnet/minecraft/screen/NamedScreenHandlerFactory;getDisplayName()Lnet/minecraft/text/Text;
 
- 
getCustomNameReturns the custom name of this object, ornullif there is none.- Specified by:
- getCustomNamein interface- Nameable
- Returns:
- the custom name of this object, or nullif there is none
- Mappings:
- Namespace - Name - Mixin selector - official - ab- Lbeb;ab()Lsw;- intermediary - method_5797- Lnet/minecraft/class_1275;method_5797()Lnet/minecraft/class_2561;- named - getCustomName- Lnet/minecraft/util/Nameable;getCustomName()Lnet/minecraft/text/Text;
 
- 
getContainerName- Mappings:
- Namespace - Name - Mixin selector - official - g- Lczh;g()Lsw;- intermediary - method_17823- Lnet/minecraft/class_2624;method_17823()Lnet/minecraft/class_2561;- named - getContainerName- Lnet/minecraft/block/entity/LockableContainerBlockEntity;getContainerName()Lnet/minecraft/text/Text;
 
- 
checkUnlocked- Mappings:
- Namespace - Name - Mixin selector - official - d- Lczh;d(Lbyo;)Z- intermediary - method_17489- Lnet/minecraft/class_2624;method_17489(Lnet/minecraft/class_1657;)Z- named - checkUnlocked- Lnet/minecraft/block/entity/LockableContainerBlockEntity;checkUnlocked(Lnet/minecraft/entity/player/PlayerEntity;)Z
 
- 
checkUnlocked- Mappings:
- Namespace - Name - Mixin selector - official - a- Lczh;a(Lbyo;Lbdz;Lsw;)Z- intermediary - method_17487- Lnet/minecraft/class_2624;method_17487(Lnet/minecraft/class_1657;Lnet/minecraft/class_1273;Lnet/minecraft/class_2561;)Z- named - checkUnlocked- Lnet/minecraft/block/entity/LockableContainerBlockEntity;checkUnlocked(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/inventory/ContainerLock;Lnet/minecraft/text/Text;)Z
 
- 
createMenu@Nullable public @Nullable ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player) - Specified by:
- createMenuin interface- ScreenHandlerFactory
- Mappings:
- Namespace - Name - Mixin selector - official - createMenu- Lccj;createMenu(ILbyn;Lbyo;)Lcbf;- intermediary - createMenu- Lnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;- named - createMenu- Lnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
 
- 
createScreenHandler- Mappings:
- Namespace - Name - Mixin selector - official - a- Lczh;a(ILbyn;)Lcbf;- intermediary - method_5465- Lnet/minecraft/class_2624;method_5465(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;- named - createScreenHandler- Lnet/minecraft/block/entity/LockableContainerBlockEntity;createScreenHandler(ILnet/minecraft/entity/player/PlayerInventory;)Lnet/minecraft/screen/ScreenHandler;
 
 
-