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.BlockStatePairKeyNested 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
FieldsModifier and TypeFieldDescriptionprotected static final VoxelShapeprotected static final intprotected static final intprivate static final DoubleBlockCombiner.Combiner<ChestBlockEntity, Optional<Container>> static final com.mojang.serialization.MapCodec<ChestBlock> protected static final VoxelShapestatic final intstatic final DirectionPropertyprivate static final DoubleBlockCombiner.Combiner<ChestBlockEntity, Optional<MenuProvider>> protected static final VoxelShapeprotected static final VoxelShapestatic final EnumProperty<ChestType> static final BooleanPropertyprotected static final VoxelShapeFields inherited from class net.minecraft.world.level.block.AbstractChestBlock
blockEntityTypeFields 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_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionChestBlock(BlockBehaviour.Properties p_51490_, Supplier<BlockEntityType<? extends ChestBlockEntity>> p_51491_) -
Method Summary
Modifier and TypeMethodDescriptionBlockEntityType<? extends ChestBlockEntity> private DirectioncandidatePartnerFacing(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 voidprotected intgetAnalogOutputSignal(BlockState p_51527_, Level p_51528_, BlockPos p_51529_) getBlockType(BlockState p_51583_) static DirectiongetConnectedDirection(BlockState p_51585_) static ContainergetContainer(ChestBlock p_51512_, BlockState p_51513_, Level p_51514_, BlockPos p_51515_, boolean p_51516_) protected FluidStategetFluidState(BlockState p_51581_) protected MenuProvidergetMenuProvider(BlockState p_51574_, Level p_51575_, BlockPos p_51576_) protected Stat<ResourceLocation> protected RenderShapegetRenderShape(BlockState p_51567_) protected VoxelShapegetShape(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 booleanhasAnalogOutputSignal(BlockState p_51520_) private static booleanisBlockedChestByBlock(BlockGetter p_51500_, BlockPos p_51501_) private static booleanisCatSittingOnChest(LevelAccessor p_51564_, BlockPos p_51565_) static booleanisChestBlockedAt(LevelAccessor p_51509_, BlockPos p_51510_) protected booleanisPathfindable(BlockState p_51522_, PathComputationType p_51525_) protected BlockStatemirror(BlockState p_51549_, Mirror p_51550_) newBlockEntity(BlockPos p_153064_, BlockState p_153065_) protected voidonRemove(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 BlockStaterotate(BlockState p_51552_, Rotation p_51553_) protected voidtick(BlockState p_220958_, ServerLevel p_220959_, BlockPos p_220960_, RandomSource p_220961_) protected BlockStateupdateShape(BlockState p_51555_, Direction p_51556_, BlockState p_51557_, LevelAccessor p_51558_, BlockPos p_51559_, BlockPos p_51560_) protected InteractionResultuseWithoutItem(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, triggerEventMethods 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, withPropertiesOfMethods 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, useShapeForLightOcclusionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListenerMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods 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, supportsExternalFaceHidingMethods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSoundMethods 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:
codecin classAbstractChestBlock<ChestBlockEntity>
-
getBlockType
-
getRenderShape
- Overrides:
getRenderShapein classBaseEntityBlock
-
updateShape
protected BlockState updateShape(BlockState p_51555_, Direction p_51556_, BlockState p_51557_, LevelAccessor p_51558_, BlockPos p_51559_, BlockPos p_51560_) - Overrides:
updateShapein classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState p_51569_, BlockGetter p_51570_, BlockPos p_51571_, CollisionContext p_51572_) - Overrides:
getShapein classBlockBehaviour
-
getConnectedDirection
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
getFluidState
- Overrides:
getFluidStatein classBlockBehaviour
-
candidatePartnerFacing
-
onRemove
protected void onRemove(BlockState p_51538_, Level p_51539_, BlockPos p_51540_, BlockState p_51541_, boolean p_51542_) - Overrides:
onRemovein classBlockBehaviour
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_51531_, Level p_51532_, BlockPos p_51533_, Player p_51534_, BlockHitResult p_51536_) - Overrides:
useWithoutItemin 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:
combinein classAbstractChestBlock<ChestBlockEntity>
-
getMenuProvider
@Nullable protected MenuProvider getMenuProvider(BlockState p_51574_, Level p_51575_, BlockPos p_51576_) - Overrides:
getMenuProviderin classBaseEntityBlock
-
opennessCombiner
public static DoubleBlockCombiner.Combiner<ChestBlockEntity,it.unimi.dsi.fastutil.floats.Float2FloatFunction> opennessCombiner(LidBlockEntity p_51518_) -
newBlockEntity
- Specified by:
newBlockEntityin interfaceEntityBlock
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_153055_, BlockState p_153056_, BlockEntityType<T> p_153057_) - Specified by:
getTickerin interfaceEntityBlock
-
isChestBlockedAt
-
isBlockedChestByBlock
-
isCatSittingOnChest
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignalin classBlockBehaviour
-
getAnalogOutputSignal
- Overrides:
getAnalogOutputSignalin classBlockBehaviour
-
rotate
- Overrides:
rotatein classBlockBehaviour
-
mirror
- Overrides:
mirrorin classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
isPathfindable
- Overrides:
isPathfindablein classBlockBehaviour
-
tick
protected void tick(BlockState p_220958_, ServerLevel p_220959_, BlockPos p_220960_, RandomSource p_220961_) - Overrides:
tickin classBlockBehaviour
-