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
,IBlockExtension
-
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
static final com.mojang.serialization.MapCodec
<BedBlock> private final DyeColor
protected static final VoxelShape
protected static final int
protected static final VoxelShape
protected static final VoxelShape
protected static final VoxelShape
protected static final VoxelShape
private static final int
protected static final VoxelShape
static final BooleanProperty
static final EnumProperty
<BedPart> protected static final VoxelShape
protected static final VoxelShape
Fields inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlock
FACING
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
-
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 void
static boolean
canSetSpawn
(Level p_49489_) com.mojang.serialization.MapCodec
<BedBlock> codec()
protected void
void
fallOn
(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 Direction
getBedOrientation
(BlockGetter p_49486_, BlockPos p_49487_) getBlockType
(BlockState p_49560_) getColor()
static Direction
getConnectedDirection
(BlockState p_49558_) private static Direction
getNeighbourDirection
(BedPart p_49534_, Direction p_49535_) protected RenderShape
getRenderShape
(BlockState p_49545_) protected long
getSeed
(BlockState p_49522_, BlockPos p_49523_) protected VoxelShape
getShape
(BlockState p_49547_, BlockGetter p_49548_, BlockPos p_49549_, CollisionContext p_49550_) getStateForPlacement
(BlockPlaceContext p_49479_) private static boolean
isBunkBed
(BlockGetter p_49542_, BlockPos p_49543_) protected boolean
isPathfindable
(BlockState p_49510_, PathComputationType p_49513_) private boolean
kickVillagerOutOfBed
(Level p_49491_, BlockPos p_49492_) newBlockEntity
(BlockPos p_152175_, BlockState p_152176_) playerWillDestroy
(Level p_49505_, BlockPos p_49506_, BlockState p_49507_, Player p_49508_) void
setPlacedBy
(Level p_49499_, BlockPos p_49500_, BlockState p_49501_, LivingEntity p_49502_, ItemStack p_49503_) void
updateEntityAfterFallOn
(BlockGetter p_49483_, Entity p_49484_) protected BlockState
updateShape
(BlockState p_49525_, Direction p_49526_, BlockState p_49527_, LevelAccessor p_49528_, BlockPos p_49529_, BlockPos p_49530_) protected InteractionResult
useWithoutItem
(BlockState p_49515_, Level p_49516_, BlockPos p_49517_, Player p_49518_, BlockHitResult p_49520_) Methods inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlock
mirror, rotate
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, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isRandomlyTicking, isSignalSource, neighborChanged, onExplosionHit, onPlace, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, 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, getTicker
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
-
Field Details
-
CODEC
-
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
-
codec
- Specified by:
codec
in classHorizontalDirectionalBlock
-
getBedOrientation
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState p_49515_, Level p_49516_, BlockPos p_49517_, Player p_49518_, BlockHitResult p_49520_) - Overrides:
useWithoutItem
in classBlockBehaviour
-
canSetSpawn
-
kickVillagerOutOfBed
-
fallOn
public void fallOn(Level p_152169_, BlockState p_152170_, BlockPos p_152171_, Entity p_152172_, float p_152173_) -
updateEntityAfterFallOn
- Overrides:
updateEntityAfterFallOn
in classBlock
-
bounceUp
-
updateShape
protected BlockState updateShape(BlockState p_49525_, Direction p_49526_, BlockState p_49527_, LevelAccessor p_49528_, BlockPos p_49529_, BlockPos p_49530_) - Overrides:
updateShape
in classBlockBehaviour
-
getNeighbourDirection
-
playerWillDestroy
public BlockState playerWillDestroy(Level p_49505_, BlockPos p_49506_, BlockState p_49507_, Player p_49508_) - Overrides:
playerWillDestroy
in classBlock
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
getShape
protected VoxelShape getShape(BlockState p_49547_, BlockGetter p_49548_, BlockPos p_49549_, CollisionContext p_49550_) - Overrides:
getShape
in 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_) -
getRenderShape
- Overrides:
getRenderShape
in classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
newBlockEntity
- Specified by:
newBlockEntity
in interfaceEntityBlock
-
setPlacedBy
public void setPlacedBy(Level p_49499_, BlockPos p_49500_, BlockState p_49501_, @Nullable LivingEntity p_49502_, ItemStack p_49503_) - Overrides:
setPlacedBy
in classBlock
-
getColor
-
getSeed
- Overrides:
getSeed
in classBlockBehaviour
-
isPathfindable
- Overrides:
isPathfindable
in classBlockBehaviour
-
bedStandUpOffsets
-
bedSurroundStandUpOffsets
-
bedAboveStandUpOffsets
-