Package net.minecraft.world.level.block
Class ChestBlock
- All Implemented Interfaces:
FeatureElement
,BucketPickup
,EntityBlock
,LiquidBlockContainer
,SimpleWaterloggedBlock
,ItemLike
,IBlockExtension
,IBucketPickupExtension
- Direct Known Subclasses:
TrappedChestBlock
public class ChestBlock
extends AbstractChestBlock<ChestBlockEntity>
implements SimpleWaterloggedBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.BlockStatePairKey
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final VoxelShape
protected static final int
protected static final int
private static final DoubleBlockCombiner.Combiner
<ChestBlockEntity, Optional<Container>> static final com.mojang.serialization.MapCodec
<ChestBlock> protected static final VoxelShape
static final int
static final DirectionProperty
private static final DoubleBlockCombiner.Combiner
<ChestBlockEntity, Optional<MenuProvider>> protected static final VoxelShape
protected static final VoxelShape
static final EnumProperty
<ChestType> static final BooleanProperty
protected static final VoxelShape
Fields inherited from class net.minecraft.world.level.block.AbstractChestBlock
blockEntityType
Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SUPPRESS_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
ConstructorDescriptionChestBlock
(BlockBehaviour.Properties p_51490_, Supplier<BlockEntityType<? extends ChestBlockEntity>> p_51491_) -
Method Summary
Modifier and TypeMethodDescriptionBlockEntityType
<? extends ChestBlockEntity> private Direction
candidatePartnerFacing
(BlockPlaceContext p_51495_, Direction p_51496_) com.mojang.serialization.MapCodec
<? extends ChestBlock> codec()
combine
(BlockState p_51544_, Level p_51545_, BlockPos p_51546_, boolean p_51547_) protected void
protected int
getAnalogOutputSignal
(BlockState p_51527_, Level p_51528_, BlockPos p_51529_) getBlockType
(BlockState p_51583_) static Direction
getConnectedDirection
(BlockState p_51585_) static Container
getContainer
(ChestBlock p_51512_, BlockState p_51513_, Level p_51514_, BlockPos p_51515_, boolean p_51516_) protected FluidState
getFluidState
(BlockState p_51581_) protected MenuProvider
getMenuProvider
(BlockState p_51574_, Level p_51575_, BlockPos p_51576_) protected Stat
<ResourceLocation> protected RenderShape
getRenderShape
(BlockState p_51567_) protected VoxelShape
getShape
(BlockState p_51569_, BlockGetter p_51570_, BlockPos p_51571_, CollisionContext p_51572_) getStateForPlacement
(BlockPlaceContext p_51493_) <T extends BlockEntity>
BlockEntityTicker<T> getTicker
(Level p_153055_, BlockState p_153056_, BlockEntityType<T> p_153057_) protected boolean
hasAnalogOutputSignal
(BlockState p_51520_) private static boolean
isBlockedChestByBlock
(BlockGetter p_51500_, BlockPos p_51501_) private static boolean
isCatSittingOnChest
(LevelAccessor p_51564_, BlockPos p_51565_) static boolean
isChestBlockedAt
(LevelAccessor p_51509_, BlockPos p_51510_) protected boolean
isPathfindable
(BlockState p_51522_, PathComputationType p_51525_) protected BlockState
mirror
(BlockState p_51549_, Mirror p_51550_) newBlockEntity
(BlockPos p_153064_, BlockState p_153065_) protected void
onRemove
(BlockState p_51538_, Level p_51539_, BlockPos p_51540_, BlockState p_51541_, boolean p_51542_) static DoubleBlockCombiner.Combiner
<ChestBlockEntity, it.unimi.dsi.fastutil.floats.Float2FloatFunction> opennessCombiner
(LidBlockEntity p_51518_) protected BlockState
rotate
(BlockState p_51552_, Rotation p_51553_) protected void
tick
(BlockState p_220958_, ServerLevel p_220959_, BlockPos p_220960_, RandomSource p_220961_) protected BlockState
updateShape
(BlockState p_51555_, Direction p_51556_, BlockState p_51557_, LevelAccessor p_51558_, BlockPos p_51559_, BlockPos p_51560_) protected InteractionResult
useWithoutItem
(BlockState p_51531_, Level p_51532_, BlockPos p_51533_, Player p_51534_, BlockHitResult p_51536_) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, triggerEvent
Methods inherited from class net.minecraft.world.level.block.Block
animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isRandomlyTicking, isSignalSource, neighborChanged, onExplosionHit, onPlace, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.block.EntityBlock
getListener
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSound
Methods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
CODEC
-
FACING
-
TYPE
-
WATERLOGGED
-
EVENT_SET_OPEN_COUNT
public static final int EVENT_SET_OPEN_COUNT- See Also:
-
AABB_OFFSET
protected static final int AABB_OFFSET- See Also:
-
AABB_HEIGHT
protected static final int AABB_HEIGHT- See Also:
-
NORTH_AABB
-
SOUTH_AABB
-
WEST_AABB
-
EAST_AABB
-
AABB
-
CHEST_COMBINER
private static final DoubleBlockCombiner.Combiner<ChestBlockEntity,Optional<Container>> CHEST_COMBINER -
MENU_PROVIDER_COMBINER
private static final DoubleBlockCombiner.Combiner<ChestBlockEntity,Optional<MenuProvider>> MENU_PROVIDER_COMBINER
-
-
Constructor Details
-
ChestBlock
public ChestBlock(BlockBehaviour.Properties p_51490_, Supplier<BlockEntityType<? extends ChestBlockEntity>> p_51491_)
-
-
Method Details
-
codec
- Specified by:
codec
in classAbstractChestBlock<ChestBlockEntity>
-
getBlockType
-
getRenderShape
- Overrides:
getRenderShape
in classBaseEntityBlock
-
updateShape
protected BlockState updateShape(BlockState p_51555_, Direction p_51556_, BlockState p_51557_, LevelAccessor p_51558_, BlockPos p_51559_, BlockPos p_51560_) - Overrides:
updateShape
in classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState p_51569_, BlockGetter p_51570_, BlockPos p_51571_, CollisionContext p_51572_) - Overrides:
getShape
in classBlockBehaviour
-
getConnectedDirection
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
getFluidState
- Overrides:
getFluidState
in classBlockBehaviour
-
candidatePartnerFacing
-
onRemove
protected void onRemove(BlockState p_51538_, Level p_51539_, BlockPos p_51540_, BlockState p_51541_, boolean p_51542_) - Overrides:
onRemove
in classBlockBehaviour
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_51531_, Level p_51532_, BlockPos p_51533_, Player p_51534_, BlockHitResult p_51536_) - Overrides:
useWithoutItem
in classBlockBehaviour
-
getOpenChestStat
-
blockEntityType
-
getContainer
@Nullable public static Container getContainer(ChestBlock p_51512_, BlockState p_51513_, Level p_51514_, BlockPos p_51515_, boolean p_51516_) -
combine
public DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> combine(BlockState p_51544_, Level p_51545_, BlockPos p_51546_, boolean p_51547_) - Specified by:
combine
in classAbstractChestBlock<ChestBlockEntity>
-
getMenuProvider
@Nullable protected MenuProvider getMenuProvider(BlockState p_51574_, Level p_51575_, BlockPos p_51576_) - Overrides:
getMenuProvider
in classBaseEntityBlock
-
opennessCombiner
public static DoubleBlockCombiner.Combiner<ChestBlockEntity,it.unimi.dsi.fastutil.floats.Float2FloatFunction> opennessCombiner(LidBlockEntity p_51518_) -
newBlockEntity
- Specified by:
newBlockEntity
in interfaceEntityBlock
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_153055_, BlockState p_153056_, BlockEntityType<T> p_153057_) - Specified by:
getTicker
in interfaceEntityBlock
-
isChestBlockedAt
-
isBlockedChestByBlock
-
isCatSittingOnChest
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignal
in classBlockBehaviour
-
getAnalogOutputSignal
- Overrides:
getAnalogOutputSignal
in classBlockBehaviour
-
rotate
- Overrides:
rotate
in classBlockBehaviour
-
mirror
- Overrides:
mirror
in classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
isPathfindable
- Overrides:
isPathfindable
in classBlockBehaviour
-
tick
protected void tick(BlockState p_220958_, ServerLevel p_220959_, BlockPos p_220960_, RandomSource p_220961_) - Overrides:
tick
in classBlockBehaviour
-