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 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.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier 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.HorizontalDirectionalBlock
FACINGFields 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, UPDATE_SUPPRESS_LIGHTFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier 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_) getPistonPushReaction(BlockState p_49556_) 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.HorizontalDirectionalBlock
mirror, rotateMethods 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, 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.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMaterialColor, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListener, getTickerMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods 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, 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
-
HEIGHT
protected static final int HEIGHT- See Also:
-
BASE
-
LEG_WIDTH
private 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
-
use
public InteractionResult use(BlockState p_49515_, Level p_49516_, BlockPos p_49517_, Player p_49518_, InteractionHand p_49519_, BlockHitResult p_49520_) - Overrides:
usein classBlockBehaviour
-
canSetSpawn
-
kickVillagerOutOfBed
-
fallOn
public void fallOn(Level p_152169_, BlockState p_152170_, BlockPos p_152171_, Entity p_152172_, float p_152173_) -
updateEntityAfterFallOn
- Overrides:
updateEntityAfterFallOnin classBlock
-
bounceUp
-
updateShape
public BlockState updateShape(BlockState p_49525_, Direction p_49526_, BlockState p_49527_, LevelAccessor p_49528_, BlockPos p_49529_, BlockPos p_49530_) - Overrides:
updateShapein classBlockBehaviour
-
getNeighbourDirection
-
playerWillDestroy
public void playerWillDestroy(Level p_49505_, BlockPos p_49506_, BlockState p_49507_, Player p_49508_) - Overrides:
playerWillDestroyin classBlock
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
getShape
public VoxelShape getShape(BlockState p_49547_, BlockGetter p_49548_, BlockPos p_49549_, CollisionContext p_49550_) - Overrides:
getShapein classBlockBehaviour
-
getConnectedDirection
-
getBlockType
-
isBunkBed
-
findStandUpPosition
public static Optional<Vec3> findStandUpPosition(EntityType<?> p_261547_, CollisionGetter p_261946_, BlockPos p_261614_, Direction p_261648_, float p_261680_) -
findBunkBedStandUpPosition
private static Optional<Vec3> findBunkBedStandUpPosition(EntityType<?> p_49464_, CollisionGetter p_49465_, BlockPos p_49466_, Direction p_49467_, Direction p_49468_) -
findStandUpPositionAtOffset
private static Optional<Vec3> findStandUpPositionAtOffset(EntityType<?> p_49470_, CollisionGetter p_49471_, BlockPos p_49472_, int[][] p_49473_, boolean p_49474_) -
getPistonPushReaction
- Overrides:
getPistonPushReactionin classBlockBehaviour
-
getRenderShape
- Overrides:
getRenderShapein classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
newBlockEntity
- Specified by:
newBlockEntityin interfaceEntityBlock
-
setPlacedBy
public void setPlacedBy(Level p_49499_, BlockPos p_49500_, BlockState p_49501_, @Nullable LivingEntity p_49502_, ItemStack p_49503_) - Overrides:
setPlacedByin classBlock
-
getColor
-
getSeed
- Overrides:
getSeedin classBlockBehaviour
-
isPathfindable
public boolean isPathfindable(BlockState p_49510_, BlockGetter p_49511_, BlockPos p_49512_, PathComputationType p_49513_) - Overrides:
isPathfindablein classBlockBehaviour
-
bedStandUpOffsets
-
bedSurroundStandUpOffsets
-
bedAboveStandUpOffsets
-