net.minecraft.block.entity

public class ChestBlockEntity

extends LootableContainerBlockEntity implements LidOpenable

All mapped superinterfaces:

DebugTrackable, EntryConvertible, Inventory, Clearable, StackReferenceGetter, NamedScreenHandlerFactory, ScreenHandlerFactory, Nameable, LootableInventory, LidOpenable

net.minecraft.world.level.block.entity.ChestBlockEntity
net.minecraft.class_2595
net.minecraft.block.entity.ChestBlockEntity

Field summary

Modifier and TypeField
private static final int
EVENT_SET_OPEN_COUNT
field_31332
VIEWER_COUNT_UPDATE_EVENT_TYPE
private static final Text
DEFAULT_NAME
field_63039
CONTAINER_NAME_TEXT
private DefaultedList<ItemStack>
items
field_11927
inventory
private final ViewerCountManager
openersCounter
field_27209
stateManager
private final ChestLidAnimator
chestLidController
field_27210
lidAnimator

Constructor summary

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

Method summary

Modifier and TypeMethod
public int
getContainerSize()
method_5439()
size()
protected Text
getDefaultName()
method_17823()
getContainerName()
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 static void
lidAnimateTick(Level level, BlockPos pos, BlockState state, ChestBlockEntity entity)
method_31670(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_2595 arg3)
clientTick(World world, BlockPos pos, BlockState state, ChestBlockEntity blockEntity)
private static void
playSound(Level level, BlockPos worldPosition, BlockState blockState, SoundEvent event)
method_11050(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_3414 arg3)
playSound(World world, BlockPos pos, BlockState state, SoundEvent soundEvent)
public boolean
triggerEvent(int b0, int b1)
method_11004(int arg0, int arg1)
onSyncedBlockEvent(int arg0, int arg1)
public void
startOpen(ContainerUser containerUser)
method_5435(class_11565 arg0)
onOpen(ContainerUser arg0)
public void
stopOpen(ContainerUser containerUser)
method_5432(class_11565 arg0)
onClose(ContainerUser arg0)
public List<ContainerUser>
getEntitiesWithContainerOpen()
method_72379()
getViewingUsers()
protected DefaultedList<ItemStack>
getItems()
method_11282()
getHeldStacks()
protected void
setItems(NonNullList<ItemStack> items)
method_11281(class_2371<class_1799> arg0)
setHeldStacks(DefaultedList<ItemStack> arg0)
public float
getOpenNess(float a)
method_11274(float arg0)
getAnimationProgress(float arg0)
public static int
getOpenCount(BlockGetter level, BlockPos pos)
method_11048(class_1922 arg0, class_2338 arg1)
getPlayersLookingInChestCount(BlockView world, BlockPos pos)
public static void
swapContents(ChestBlockEntity one, ChestBlockEntity two)
method_11047(class_2595 arg0, class_2595 arg1)
copyInventory(ChestBlockEntity from, ChestBlockEntity to)
protected ScreenHandler
createMenu(int containerId, Inventory inventory)
method_5465(int arg0, class_1661 arg1)
createScreenHandler(int arg0, PlayerInventory arg1)
public void
recheckOpen()
method_31671()
onScheduledTick()
protected void
signalOpenCount(Level level, BlockPos pos, BlockState blockState, int previous, int current)
method_11049(class_1937 arg0, class_2338 arg1, class_2680 arg2, int arg3, int arg4)
onViewerCountUpdate(World world, BlockPos pos, BlockState state, int oldViewerCount, int newViewerCount)