net.minecraft.block

public class BedBlock

extends HorizontalFacingBlock

All mapped superinterfaces:

ToggleableFeature, ItemConvertible

net.minecraft.world.level.block.BedBlock
net.minecraft.class_2244
net.minecraft.block.BedBlock

Field summary

Modifier and TypeField
public static final com.mojang.serialization.MapCodec<BedBlock>
CODEC
field_46273
CODEC
public static final EnumProperty<BedPart>
PART
field_9967
PART
public static final BooleanProperty
OCCUPIED
field_9968
OCCUPIED
private static final Map<Direction, VoxelShape>
SHAPES
field_55732
SHAPES_BY_DIRECTION
private final DyeColor
color
field_9966
color

Constructor summary

ModifierConstructor
public (DyeColor color, AbstractBlock$Settings settings)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<BedBlock>
codec()
method_53969()
getCodec()
public static Direction
getBedOrientation(BlockGetter level, BlockPos pos)
method_18476(class_1922 arg0, class_2338 arg1)
getDirection(BlockView world, BlockPos pos)
protected ActionResult
useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult)
method_55766(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3, class_3965 arg4)
onUse(BlockState arg0, World arg1, BlockPos arg2, PlayerEntity arg3, BlockHitResult arg4)
private boolean
kickVillagerOutOfBed(Level level, BlockPos pos)
method_22357(class_1937 arg0, class_2338 arg1)
wakeVillager(World world, BlockPos pos)
public void
fallOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance)
method_9554(class_1937 arg0, class_2680 arg1, class_2338 arg2, class_1297 arg3, double arg4)
onLandedUpon(World arg0, BlockState arg1, BlockPos arg2, Entity arg3, double arg4)
protected BlockState
updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random)
method_9559(class_2680 arg0, class_4538 arg1, class_10225 arg2, class_2338 arg3, class_2350 arg4, class_2338 arg5, class_2680 arg6, class_5819 arg7)
getStateForNeighborUpdate(BlockState arg0, WorldView arg1, ScheduledTickView arg2, BlockPos arg3, Direction arg4, BlockPos arg5, BlockState arg6, Random arg7)
private static Direction
getNeighbourDirection(BedPart part, Direction facing)
method_9488(class_2742 arg0, class_2350 arg1)
getDirectionTowardsOtherPart(BedPart part, Direction direction)
public BlockState
playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player)
method_9576(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_1657 arg3)
onBreak(World arg0, BlockPos arg1, BlockState arg2, PlayerEntity arg3)
public BlockState
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext arg0)
protected VoxelShape
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9530(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getOutlineShape(BlockState arg0, BlockView arg1, BlockPos arg2, ShapeContext arg3)
public static Direction
getConnectedDirection(BlockState state)
method_24163(class_2680 arg0)
getOppositePartDirection(BlockState state)
public static DoubleBlockProperties$Type
getBlockType(BlockState state)
method_24164(class_2680 arg0)
getBedPart(BlockState state)
private static boolean
isBunkBed(BlockGetter level, BlockPos pos)
method_30839(class_1922 arg0, class_2338 arg1)
isBedBelow(BlockView world, BlockPos pos)
public static Optional<Vec3d>
findStandUpPosition(EntityType<?> type, CollisionGetter level, BlockPos pos, Direction forward, float yaw)
method_9484(class_1299<?> arg0, class_1941 arg1, class_2338 arg2, class_2350 arg3, float arg4)
findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, Direction bedDirection, float spawnAngle)
private static Optional<Vec3d>
findBunkBedStandUpPosition(EntityType<?> type, CollisionGetter level, BlockPos pos, Direction forward, Direction side)
method_30835(class_1299<?> arg0, class_1941 arg1, class_2338 arg2, class_2350 arg3, class_2350 arg4)
findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, Direction bedDirection, Direction respawnDirection)
private static Optional<Vec3d>
findStandUpPositionAtOffset(EntityType<?> type, CollisionGetter level, BlockPos pos, int[][] offsets, boolean checkDangerous)
method_30836(class_1299<?> arg0, class_1941 arg1, class_2338 arg2, int[][] arg3, boolean arg4)
findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, int[][] possibleOffsets, boolean ignoreInvalidPos)
protected void
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> arg0)
public void
setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity by, ItemStack itemStack)
method_9567(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_1309 arg3, class_1799 arg4)
onPlaced(World arg0, BlockPos arg1, BlockState arg2, LivingEntity arg3, ItemStack arg4)
public DyeColor
getColor()
method_9487()
getColor()
protected long
getSeed(BlockState state, BlockPos pos)
method_9535(class_2680 arg0, class_2338 arg1)
getRenderingSeed(BlockState arg0, BlockPos arg1)
protected boolean
isPathfindable(BlockState state, PathComputationType type)
method_9516(class_2680 arg0, class_10 arg1)
canPathfindThrough(BlockState arg0, NavigationType arg1)
private static int[][]
bedStandUpOffsets(Direction forward, Direction side)
method_30838(class_2350 arg0, class_2350 arg1)
getAroundAndOnBedOffsets(Direction bedDirection, Direction respawnDirection)
private static int[][]
bedSurroundStandUpOffsets(Direction forward, Direction side)
method_30840(class_2350 arg0, class_2350 arg1)
getAroundBedOffsets(Direction bedDirection, Direction respawnDirection)
private static int[][]
bedAboveStandUpOffsets(Direction forward)
method_30837(class_2350 arg0)
getOnBedOffsets(Direction bedDirection)
private static void
lambda$useWithoutItem$0(Player arg0, Player$BedSleepingProblem arg1)
method_55767(class_1657 arg0, class_1657$class_1658 arg1)
method_55767(PlayerEntity arg0, PlayerEntity$SleepFailureReason reason)
private static Map
lambda$static$1()
method_66389()
method_66389()
private static com.mojang.datafixers.kinds.App
lambda$static$0(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_53978(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_53978(com.mojang.serialization.codecs.RecordCodecBuilder$Instance instance)