net.minecraft.block.entity

public abstract class LockableContainerBlockEntity

extends BlockEntity implements Inventory, NamedScreenHandlerFactory, Nameable

All mapped superinterfaces:

DebugTrackable, Inventory, Clearable, StackReferenceGetter, NamedScreenHandlerFactory, ScreenHandlerFactory, Nameable

net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.class_2624
net.minecraft.block.entity.LockableContainerBlockEntity

Field summary

Modifier and TypeField
private ContainerLock
lockKey
field_12045
lock
private Text
name
field_17376
customName

Constructor summary

ModifierConstructor
protected (BlockEntityType<?> type, BlockPos worldPosition, BlockState blockState)

Method summary

Modifier and TypeMethod
protected void
loadAdditional(ValueInput input)
method_11014(class_11368 arg0)
readData(ReadView arg0)
protected void
saveAdditional(ValueOutput output)
method_11007(class_11372 arg0)
writeData(WriteView arg0)
public Text
getName()
method_5477()
getName()
public Text
getDisplayName()
method_5476()
getDisplayName()
public Text
getCustomName()
method_5797()
getCustomName()
protected abstract Text
getDefaultName()
method_17823()
getContainerName()
public boolean
canOpen(Player player)
method_17489(class_1657 arg0)
checkUnlocked(PlayerEntity player)
public static void
sendChestLockedNotifications(Vec3 pos, Player player, Component displayName)
method_76772(class_243 arg0, class_1657 arg1, class_2561 arg2)
handleLocked(Vec3d containerPos, PlayerEntity player, Text name)
public boolean
isLocked()
method_74145()
isLocked()
protected abstract DefaultedList<ItemStack>
getItems()
method_11282()
getHeldStacks()
protected abstract void
setItems(NonNullList<ItemStack> items)
method_11281(class_2371<class_1799> arg0)
setHeldStacks(DefaultedList<ItemStack> inventory)
public boolean
isEmpty()
method_5442()
isEmpty()
public ItemStack
getItem(int slot)
method_5438(int arg0)
getStack(int arg0)
public ItemStack
removeItem(int slot, int count)
method_5434(int arg0, int arg1)
removeStack(int arg0, int arg1)
public ItemStack
removeItemNoUpdate(int slot)
method_5441(int arg0)
removeStack(int arg0)
public void
setItem(int slot, ItemStack itemStack)
method_5447(int arg0, class_1799 arg1)
setStack(int arg0, ItemStack arg1)
public boolean
stillValid(Player player)
method_5443(class_1657 arg0)
canPlayerUse(PlayerEntity arg0)
public void
clearContent()
method_5448()
clear()
public ScreenHandler
createMenu(int containerId, Inventory inventory, Player player)
method_1_147(int arg0, class_1661 arg1, class_1657 arg2)
createMenu(int arg0, PlayerInventory arg1, PlayerEntity arg2)
protected abstract ScreenHandler
createMenu(int containerId, Inventory inventory)
method_5465(int arg0, class_1661 arg1)
createScreenHandler(int syncId, PlayerInventory playerInventory)
protected void
applyImplicitComponents(DataComponentGetter components)
method_57568(class_9473 arg0)
readComponents(ComponentsAccess arg0)
protected void
collectImplicitComponents(DataComponentMap$Builder components)
method_57567(class_9323$class_9324 arg0)
addComponents(ComponentMap$Builder arg0)
public void
removeComponentsFromTag(ValueOutput output)
method_57569(class_11372 arg0)
removeFromCopiedStackData(WriteView arg0)