Package net.minecraft.world.level.block
Class BedBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.HorizontalDirectionalBlock
net.minecraft.world.level.block.BedBlock
- All Implemented Interfaces:
- FeatureElement,- EntityBlock,- ItemLike,- IForgeBlock
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.level.block.BlockBlock.BlockStatePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviourBlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final VoxelShapeprivate final DyeColorprotected static final VoxelShapeprotected static final intprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprivate static final intprotected static final VoxelShapestatic final BooleanPropertystatic final EnumProperty<BedPart>protected static final VoxelShapeprotected static final VoxelShapeFields inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlockFACINGFields inherited from class net.minecraft.world.level.block.BlockBLOCK_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.BlockBehaviourdrops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElementFILTERED_REGISTRIES
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate static int[][]bedAboveStandUpOffsets(Direction p_49537_) private static int[][]bedStandUpOffsets(Direction p_49539_, Direction p_49540_) private static int[][]bedSurroundStandUpOffsets(Direction p_49552_, Direction p_49553_) private voidstatic booleancanSetSpawn(Level p_49489_) protected voidvoidfallOn(Level p_152169_, BlockState p_152170_, BlockPos p_152171_, Entity p_152172_, float p_152173_) findBunkBedStandUpPosition(EntityType<?> p_49464_, CollisionGetter p_49465_, BlockPos p_49466_, Direction p_49467_, Direction p_49468_) findStandUpPosition(EntityType<?> p_261547_, CollisionGetter p_261946_, BlockPos p_261614_, Direction p_261648_, float p_261680_) findStandUpPositionAtOffset(EntityType<?> p_49470_, CollisionGetter p_49471_, BlockPos p_49472_, int[][] p_49473_, boolean p_49474_) static DirectiongetBedOrientation(BlockGetter p_49486_, BlockPos p_49487_) getBlockType(BlockState p_49560_) getColor()static DirectiongetConnectedDirection(BlockState p_49558_) private static DirectiongetNeighbourDirection(BedPart p_49534_, Direction p_49535_) getRenderShape(BlockState p_49545_) longgetSeed(BlockState p_49522_, BlockPos p_49523_) getShape(BlockState p_49547_, BlockGetter p_49548_, BlockPos p_49549_, CollisionContext p_49550_) getStateForPlacement(BlockPlaceContext p_49479_) private static booleanisBunkBed(BlockGetter p_49542_, BlockPos p_49543_) booleanisPathfindable(BlockState p_49510_, BlockGetter p_49511_, BlockPos p_49512_, PathComputationType p_49513_) private booleankickVillagerOutOfBed(Level p_49491_, BlockPos p_49492_) newBlockEntity(BlockPos p_152175_, BlockState p_152176_) voidplayerWillDestroy(Level p_49505_, BlockPos p_49506_, BlockState p_49507_, Player p_49508_) voidsetPlacedBy(Level p_49499_, BlockPos p_49500_, BlockState p_49501_, LivingEntity p_49502_, ItemStack p_49503_) voidupdateEntityAfterFallOn(BlockGetter p_49483_, Entity p_49484_) updateShape(BlockState p_49525_, Direction p_49526_, BlockState p_49527_, LevelAccessor p_49528_, BlockPos p_49529_, BlockPos p_49530_) use(BlockState p_49515_, Level p_49516_, BlockPos p_49517_, Player p_49518_, InteractionHand p_49519_, BlockHitResult p_49520_) Methods inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlockmirror, rotateMethods inherited from class net.minecraft.world.level.block.BlockanimateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, dropResources, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviourattack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, neighborChanged, onPlace, onProjectileHit, onRemove, randomTick, requiredFeatures, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useShapeForLightOcclusionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlockgetListener, getTickerMethods inherited from interface net.minecraft.world.flag.FeatureElementisEnabledMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockaddLandingEffects, 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
- 
Field Details- 
PART
- 
OCCUPIED
- 
HEIGHTprotected static final int HEIGHT- See Also:
 
- 
BASE
- 
LEG_WIDTHprivate static final int LEG_WIDTH- See Also:
 
- 
LEG_NORTH_WEST
- 
LEG_SOUTH_WEST
- 
LEG_NORTH_EAST
- 
LEG_SOUTH_EAST
- 
NORTH_SHAPE
- 
SOUTH_SHAPE
- 
WEST_SHAPE
- 
EAST_SHAPE
- 
color
 
- 
- 
Constructor Details- 
BedBlock
 
- 
- 
Method Details- 
getBedOrientation
- 
usepublic InteractionResult use(BlockState p_49515_, Level p_49516_, BlockPos p_49517_, Player p_49518_, InteractionHand p_49519_, BlockHitResult p_49520_) - Overrides:
- usein class- BlockBehaviour
 
- 
canSetSpawn
- 
kickVillagerOutOfBed
- 
fallOnpublic void fallOn(Level p_152169_, BlockState p_152170_, BlockPos p_152171_, Entity p_152172_, float p_152173_) 
- 
updateEntityAfterFallOn- Overrides:
- updateEntityAfterFallOnin class- Block
 
- 
bounceUp
- 
updateShapepublic BlockState updateShape(BlockState p_49525_, Direction p_49526_, BlockState p_49527_, LevelAccessor p_49528_, BlockPos p_49529_, BlockPos p_49530_) - Overrides:
- updateShapein class- BlockBehaviour
 
- 
getNeighbourDirection
- 
playerWillDestroypublic void playerWillDestroy(Level p_49505_, BlockPos p_49506_, BlockState p_49507_, Player p_49508_) - Overrides:
- playerWillDestroyin class- Block
 
- 
getStateForPlacement- Overrides:
- getStateForPlacementin class- Block
 
- 
getShapepublic VoxelShape getShape(BlockState p_49547_, BlockGetter p_49548_, BlockPos p_49549_, CollisionContext p_49550_) - Overrides:
- getShapein class- BlockBehaviour
 
- 
getConnectedDirection
- 
getBlockType
- 
isBunkBed
- 
findStandUpPositionpublic static Optional<Vec3> findStandUpPosition(EntityType<?> p_261547_, CollisionGetter p_261946_, BlockPos p_261614_, Direction p_261648_, float p_261680_) 
- 
findBunkBedStandUpPositionprivate static Optional<Vec3> findBunkBedStandUpPosition(EntityType<?> p_49464_, CollisionGetter p_49465_, BlockPos p_49466_, Direction p_49467_, Direction p_49468_) 
- 
findStandUpPositionAtOffsetprivate static Optional<Vec3> findStandUpPositionAtOffset(EntityType<?> p_49470_, CollisionGetter p_49471_, BlockPos p_49472_, int[][] p_49473_, boolean p_49474_) 
- 
getRenderShape- Overrides:
- getRenderShapein class- BlockBehaviour
 
- 
createBlockStateDefinition- Overrides:
- createBlockStateDefinitionin class- Block
 
- 
newBlockEntity- Specified by:
- newBlockEntityin interface- EntityBlock
 
- 
setPlacedBypublic void setPlacedBy(Level p_49499_, BlockPos p_49500_, BlockState p_49501_, @Nullable LivingEntity p_49502_, ItemStack p_49503_) - Overrides:
- setPlacedByin class- Block
 
- 
getColor
- 
getSeed- Overrides:
- getSeedin class- BlockBehaviour
 
- 
isPathfindablepublic boolean isPathfindable(BlockState p_49510_, BlockGetter p_49511_, BlockPos p_49512_, PathComputationType p_49513_) - Overrides:
- isPathfindablein class- BlockBehaviour
 
- 
bedStandUpOffsets
- 
bedSurroundStandUpOffsets
- 
bedAboveStandUpOffsets
 
-