Package net.minecraft.world.level.block
Class ChestBlock
- All Implemented Interfaces:
FeatureElement
,BucketPickup
,EntityBlock
,LiquidBlockContainer
,SimpleWaterloggedBlock
,ItemLike
,IForgeBlock
,IForgeBucketPickup
- 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>> 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_) combine
(BlockState p_51544_, Level p_51545_, BlockPos p_51546_, boolean p_51547_) protected void
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_) getFluidState
(BlockState p_51581_) getMenuProvider
(BlockState p_51574_, Level p_51575_, BlockPos p_51576_) protected Stat<ResourceLocation>
getRenderShape
(BlockState p_51567_) 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_) 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_) boolean
isPathfindable
(BlockState p_51522_, BlockGetter p_51523_, BlockPos p_51524_, PathComputationType p_51525_) mirror
(BlockState p_51549_, Mirror p_51550_) newBlockEntity
(BlockPos p_153064_, BlockState p_153065_) 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_) rotate
(BlockState p_51552_, Rotation p_51553_) void
setPlacedBy
(Level p_51503_, BlockPos p_51504_, BlockState p_51505_, LivingEntity p_51506_, ItemStack p_51507_) void
tick
(BlockState p_220958_, ServerLevel p_220959_, BlockPos p_220960_, RandomSource p_220961_) updateShape
(BlockState p_51555_, Direction p_51556_, BlockState p_51557_, LevelAccessor p_51558_, BlockPos p_51559_, BlockPos p_51560_) use
(BlockState p_51531_, Level p_51532_, BlockPos p_51533_, Player p_51534_, InteractionHand p_51535_, 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, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, 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, getVisualShape, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, neighborChanged, onPlace, onProjectileHit, randomTick, requiredFeatures, skipRendering, spawnAfterBreak, updateIndirectNeighbourShapes, 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.minecraftforge.common.extensions.IForgeBlock
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hidesNeighborFace, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBucketPickup
getPickupSound
Methods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
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
-
getBlockType
-
getRenderShape
- Overrides:
getRenderShape
in classBaseEntityBlock
-
updateShape
public 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
public 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
-
setPlacedBy
public void setPlacedBy(Level p_51503_, BlockPos p_51504_, BlockState p_51505_, LivingEntity p_51506_, ItemStack p_51507_) - Overrides:
setPlacedBy
in classBlock
-
onRemove
public void onRemove(BlockState p_51538_, Level p_51539_, BlockPos p_51540_, BlockState p_51541_, boolean p_51542_) - Overrides:
onRemove
in classBlockBehaviour
-
use
public InteractionResult use(BlockState p_51531_, Level p_51532_, BlockPos p_51533_, Player p_51534_, InteractionHand p_51535_, BlockHitResult p_51536_) - Overrides:
use
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 public 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
public boolean isPathfindable(BlockState p_51522_, BlockGetter p_51523_, BlockPos p_51524_, PathComputationType p_51525_) - Overrides:
isPathfindable
in classBlockBehaviour
-
tick
public void tick(BlockState p_220958_, ServerLevel p_220959_, BlockPos p_220960_, RandomSource p_220961_) - Overrides:
tick
in classBlockBehaviour
-