net.minecraft.block

public class ChestBlock

extends AbstractChestBlock<ChestBlockEntity> implements Waterloggable

All mapped superinterfaces:

ToggleableFeature, ItemConvertible, BlockEntityProvider, Waterloggable, FluidDrainable, FluidFillable

net.minecraft.world.level.block.ChestBlock
net.minecraft.class_2281
net.minecraft.block.ChestBlock

Field summary

Modifier and TypeField
public static final EnumProperty<Direction>
FACING
field_10768
FACING
public static final EnumProperty<ChestType>
TYPE
field_10770
CHEST_TYPE
public static final BooleanProperty
WATERLOGGED
field_10772
WATERLOGGED
public static final int
EVENT_SET_OPEN_COUNT
field_31057
field_31057
private static final VoxelShape
SHAPE
field_55747
SINGLE_SHAPE
private static final Map<Direction, VoxelShape>
HALF_SHAPES
field_55748
DOUBLE_SHAPES_BY_DIRECTION
private final SoundEvent
openSound
field_61404
openSound
private final SoundEvent
closeSound
field_61403
closeSound
private static final DoubleBlockProperties$PropertyRetriever<ChestBlockEntity, Optional<Inventory>>
CHEST_COMBINER
field_17356
INVENTORY_RETRIEVER
private static final DoubleBlockProperties$PropertyRetriever<ChestBlockEntity, Optional<NamedScreenHandlerFactory>>
MENU_PROVIDER_COMBINER
field_17357
NAME_RETRIEVER

Constructor summary

ModifierConstructor
protected (Supplier<BlockEntityType<? extends ChestBlockEntity>> blockEntityTypeSupplier, SoundEvent openSound, SoundEvent closeSound, AbstractBlock$Settings settings)

Method summary

Modifier and TypeMethod
public static DoubleBlockProperties$Type
getBlockType(BlockState state)
method_24169(class_2680 arg0)
getDoubleBlockType(BlockState state)
protected BlockState
updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random)
method_9559(class_2680 arg0, class_4538 arg1, class_10225 arg2, class_2338 arg3, class_2350 arg4, class_2338 arg5, class_2680 arg6, class_5819 arg7)
getStateForNeighborUpdate(BlockState arg0, WorldView arg1, ScheduledTickView arg2, BlockPos arg3, Direction arg4, BlockPos arg5, BlockState arg6, Random arg7)
public boolean
chestCanConnectTo(BlockState blockState)
method_72582(class_2680 arg0)
canMergeWith(BlockState state)
protected VoxelShape
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9530(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getOutlineShape(BlockState arg0, BlockView arg1, BlockPos arg2, ShapeContext arg3)
public static Direction
getConnectedDirection(BlockState state)
method_9758(class_2680 arg0)
getFacing(BlockState state)
public static BlockPos
getConnectedBlockPos(BlockPos pos, BlockState state)
method_72581(class_2338 arg0, class_2680 arg1)
getPosInFrontOf(BlockPos pos, BlockState state)
public BlockState
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext arg0)
protected ChestType
getChestType(Level level, BlockPos pos, Direction facingDirection)
method_74027(class_1937 arg0, class_2338 arg1, class_2350 arg2)
getChestType(World world, BlockPos pos, Direction facing)
protected FluidState
getFluidState(BlockState state)
method_9545(class_2680 arg0)
getFluidState(BlockState arg0)
private Direction
candidatePartnerFacing(Level level, BlockPos pos, Direction neighbourDirection)
method_9753(class_1937 arg0, class_2338 arg1, class_2350 arg2)
getNeighborChestDirection(World world, BlockPos pos, Direction neighborOffset)
protected void
affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston)
method_66388(class_2680 arg0, class_3218 arg1, class_2338 arg2, boolean arg3)
onStateReplaced(BlockState arg0, ServerWorld arg1, BlockPos arg2, boolean arg3)
protected ActionResult
useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult)
method_55766(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3, class_3965 arg4)
onUse(BlockState arg0, World arg1, BlockPos arg2, PlayerEntity arg3, BlockHitResult arg4)
protected Stat<Identifier>
getOpenChestStat()
method_9755()
getOpenStat()
public BlockEntityType<? extends ChestBlockEntity>
blockEntityType()
method_31641()
getExpectedEntityType()
public static Inventory
getContainer(ChestBlock block, BlockState state, Level level, BlockPos pos, boolean ignoreBeingBlocked)
method_17458(class_2281 arg0, class_2680 arg1, class_1937 arg2, class_2338 arg3, boolean arg4)
getInventory(ChestBlock block, BlockState state, World world, BlockPos pos, boolean ignoreBlocked)
public DoubleBlockProperties$PropertySource<? extends ChestBlockEntity>
combine(BlockState state, Level level, BlockPos pos, boolean ignoreBeingBlocked)
method_24167(class_2680 arg0, class_1937 arg1, class_2338 arg2, boolean arg3)
getBlockEntitySource(BlockState arg0, World arg1, BlockPos arg2, boolean arg3)
protected NamedScreenHandlerFactory
getMenuProvider(BlockState state, Level level, BlockPos pos)
method_17454(class_2680 arg0, class_1937 arg1, class_2338 arg2)
createScreenHandlerFactory(BlockState arg0, World arg1, BlockPos arg2)
public static DoubleBlockProperties$PropertyRetriever<ChestBlockEntity, it.unimi.dsi.fastutil.floats.Float2FloatFunction>
opennessCombiner(LidBlockEntity entity)
method_24166(class_2618 arg0)
getAnimationProgressRetriever(LidOpenable progress)
public BlockEntity
newBlockEntity(BlockPos worldPosition, BlockState blockState)
method_10123(class_2338 arg0, class_2680 arg1)
createBlockEntity(BlockPos arg0, BlockState arg1)
public <T extends BlockEntity> BlockEntityTicker<T>
getTicker(Level level, BlockState blockState, BlockEntityType<T> type)
method_31645(class_1937 arg0, class_2680 arg1, class_2591<T> arg2)
getTicker(World arg0, BlockState arg1, BlockEntityType<T> arg2)
public static boolean
isChestBlockedAt(LevelAccessor level, BlockPos pos)
method_9756(class_1936 arg0, class_2338 arg1)
isChestBlocked(WorldAccess world, BlockPos pos)
private static boolean
isBlockedChestByBlock(BlockGetter level, BlockPos pos)
method_9757(class_1922 arg0, class_2338 arg1)
hasBlockOnTop(BlockView world, BlockPos pos)
private static boolean
isCatSittingOnChest(LevelAccessor level, BlockPos pos)
method_9754(class_1936 arg0, class_2338 arg1)
hasCatOnTop(WorldAccess world, BlockPos pos)
protected boolean
hasAnalogOutputSignal(BlockState state)
method_9498(class_2680 arg0)
hasComparatorOutput(BlockState arg0)
protected int
getAnalogOutputSignal(BlockState state, Level level, BlockPos pos, Direction direction)
method_9572(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2350 arg3)
getComparatorOutput(BlockState arg0, World arg1, BlockPos arg2, Direction arg3)
protected BlockState
rotate(BlockState state, Rotation rotation)
method_9598(class_2680 arg0, class_2470 arg1)
rotate(BlockState arg0, BlockRotation arg1)
protected BlockState
mirror(BlockState state, Mirror mirror)
method_9569(class_2680 arg0, class_2415 arg1)
mirror(BlockState arg0, BlockMirror arg1)
protected void
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> arg0)
protected boolean
isPathfindable(BlockState state, PathComputationType type)
method_9516(class_2680 arg0, class_10 arg1)
canPathfindThrough(BlockState arg0, NavigationType arg1)
protected void
tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random)
method_9588(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_5819 arg3)
scheduledTick(BlockState arg0, ServerWorld arg1, BlockPos arg2, Random arg3)
public SoundEvent
getOpenChestSound()
method_72583()
getOpenSound()
public SoundEvent
getCloseChestSound()
method_72584()
getCloseSound()
private static boolean
lambda$combine$0(LevelAccessor arg0, BlockPos arg1)
method_24168(class_1936 arg0, class_2338 arg1)
method_24168(WorldAccess worldx, BlockPos posx)