Class BedBlock
- All Implemented Interfaces:
BlockEntityProvider,ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name intermediary net/minecraft/class_2244official cpenamed net/minecraft/block/BedBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DyeColorprotected static final VoxelShapeprotected static final intprivate static final intprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapestatic final BooleanPropertystatic final EnumProperty<BedPart>protected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeFields inherited from class net.minecraft.block.HorizontalFacingBlock
FACINGFields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.private voidbounceEntity(Entity entity) booleancanPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.createBlockEntity(BlockPos pos, BlockState state) Returns a new block entity instance.findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, int[][] possibleOffsets, boolean ignoreInvalidPos) findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, Direction bedDirection, float spawnAngle) findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, Direction bedDirection, Direction respawnDirection) private static int[][]getAroundAndOnBedOffsets(Direction bedDirection, Direction respawnDirection) private static int[][]getAroundBedOffsets(Direction bedDirection, Direction respawnDirection) static DoubleBlockProperties.TypegetBedPart(BlockState state) getColor()getDirection(BlockView world, BlockPos pos) private static DirectiongetDirectionTowardsOtherPart(BedPart part, Direction direction) private static int[][]getOnBedOffsets(Direction bedDirection) static DirectiongetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) longgetRenderingSeed(BlockState state, BlockPos pos) Returns the seed value for rendering.getRenderType(BlockState state) Returns the block's render type (invisible, animated, model).getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.private static booleanisBedBelow(BlockView world, BlockPos pos) static booleanisBedWorking(World world) Returns whether the world's dimension type allows beds to be respawned at and slept in without exploding.voidonBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.voidonEntityLand(BlockView world, Entity entity) Called after the entity lands on the block.voidonLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) Called when the entity lands on the block.voidonPlaced(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.private booleanwakeVillager(World world, BlockPos pos) Wakes up a sleeping villager atpos, if any.Methods inherited from class net.minecraft.block.HorizontalFacingBlock
mirror, rotateMethods inherited from class net.minecraft.block.Block
afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, onBroken, onDestroyedByExplosion, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRequiredFeatures, getSidesShape, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvider
getGameEventListener, getTickerMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
PART
- Mappings:
Namespace Name Mixin selector intermediary field_9967Lnet/minecraft/class_2244;field_9967:Lnet/minecraft/class_2754;official aLcpe;a:Ldcw;named PARTLnet/minecraft/block/BedBlock;PART:Lnet/minecraft/state/property/EnumProperty;
-
OCCUPIED
- Mappings:
Namespace Name Mixin selector intermediary field_9968Lnet/minecraft/class_2244;field_9968:Lnet/minecraft/class_2746;official bLcpe;b:Ldcp;named OCCUPIEDLnet/minecraft/block/BedBlock;OCCUPIED:Lnet/minecraft/state/property/BooleanProperty;
-
field_31009
protected static final int field_31009- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_31009Lnet/minecraft/class_2244;field_31009:Iofficial cLcpe;c:Inamed field_31009Lnet/minecraft/block/BedBlock;field_31009:I
-
TOP_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16788Lnet/minecraft/class_2244;field_16788:Lnet/minecraft/class_265;official dLcpe;d:Leet;named TOP_SHAPELnet/minecraft/block/BedBlock;TOP_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
field_31010
private static final int field_31010- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_31010Lnet/minecraft/class_2244;field_31010:Iofficial mLcpe;m:Inamed field_31010Lnet/minecraft/block/BedBlock;field_31010:I
-
LEG_1_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16782Lnet/minecraft/class_2244;field_16782:Lnet/minecraft/class_265;official eLcpe;e:Leet;named LEG_1_SHAPELnet/minecraft/block/BedBlock;LEG_1_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
LEG_2_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16784Lnet/minecraft/class_2244;field_16784:Lnet/minecraft/class_265;official fLcpe;f:Leet;named LEG_2_SHAPELnet/minecraft/block/BedBlock;LEG_2_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
LEG_3_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16786Lnet/minecraft/class_2244;field_16786:Lnet/minecraft/class_265;official gLcpe;g:Leet;named LEG_3_SHAPELnet/minecraft/block/BedBlock;LEG_3_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
LEG_4_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16789Lnet/minecraft/class_2244;field_16789:Lnet/minecraft/class_265;official hLcpe;h:Leet;named LEG_4_SHAPELnet/minecraft/block/BedBlock;LEG_4_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
NORTH_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16787Lnet/minecraft/class_2244;field_16787:Lnet/minecraft/class_265;official iLcpe;i:Leet;named NORTH_SHAPELnet/minecraft/block/BedBlock;NORTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
SOUTH_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16785Lnet/minecraft/class_2244;field_16785:Lnet/minecraft/class_265;official jLcpe;j:Leet;named SOUTH_SHAPELnet/minecraft/block/BedBlock;SOUTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
WEST_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16783Lnet/minecraft/class_2244;field_16783:Lnet/minecraft/class_265;official kLcpe;k:Leet;named WEST_SHAPELnet/minecraft/block/BedBlock;WEST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EAST_SHAPE
- Mappings:
Namespace Name Mixin selector intermediary field_16790Lnet/minecraft/class_2244;field_16790:Lnet/minecraft/class_265;official lLcpe;l:Leet;named EAST_SHAPELnet/minecraft/block/BedBlock;EAST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
color
- Mappings:
Namespace Name Mixin selector intermediary field_9966Lnet/minecraft/class_2244;field_9966:Lnet/minecraft/class_1767;official nLcpe;n:Lcel;named colorLnet/minecraft/block/BedBlock;color:Lnet/minecraft/util/DyeColor;
-
-
Constructor Details
-
BedBlock
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_2244;<init>(Lnet/minecraft/class_1767;Lnet/minecraft/class_4970$class_2251;)Vofficial <init>Lcpe;<init>(Lcel;Ldbx$d;)Vnamed <init>Lnet/minecraft/block/BedBlock;<init>(Lnet/minecraft/util/DyeColor;Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getDirection
- Mappings:
Namespace Name Mixin selector intermediary method_18476Lnet/minecraft/class_2244;method_18476(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2350;official aLcpe;a(Lclq;Lgu;)Lha;named getDirectionLnet/minecraft/block/BedBlock;getDirection(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Direction;
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player. This, by default, is bound to using the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient().If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Overrides:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector intermediary method_9534Lnet/minecraft/class_4970;method_9534(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;official aLdbx;a(Ldby;Lcmk;Lgu;Lbym;Lbdv;Ledw;)Lbdw;named onUseLnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
isBedWorking
Returns whether the world's dimension type allows beds to be respawned at and slept in without exploding.- Returns:
- whether the world's dimension type allows beds to be respawned at and slept in without exploding
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_27352Lnet/minecraft/class_2244;method_27352(Lnet/minecraft/class_1937;)Zofficial aLcpe;a(Lcmk;)Znamed isBedWorkingLnet/minecraft/block/BedBlock;isBedWorking(Lnet/minecraft/world/World;)Z
-
wakeVillager
Wakes up a sleeping villager atpos, if any.- Returns:
- whether a villager was found
- Mappings:
Namespace Name Mixin selector intermediary method_22357Lnet/minecraft/class_2244;method_22357(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Zofficial aLcpe;a(Lcmk;Lgu;)Znamed wakeVillagerLnet/minecraft/block/BedBlock;wakeVillager(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z
-
onLandedUpon
public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) Called when the entity lands on the block.Default implementation deals fall damage to the entity. Blocks that increase or reduce fall damage (like
HayBlock) should override this.FarmlandBlockoverrides this method to convert the block to dirt.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient.- Overrides:
onLandedUponin classBlock- Mappings:
Namespace Name Mixin selector intermediary method_9554Lnet/minecraft/class_2248;method_9554(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;F)Vofficial aLcpl;a(Lcmk;Ldby;Lgu;Lbfh;F)Vnamed onLandedUponLnet/minecraft/block/Block;onLandedUpon(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;F)V
-
onEntityLand
Called after the entity lands on the block.Default implementation resets the entity's vertical velocity. Blocks that cause entities to jump (such as
SlimeBlock) should override this.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient.- Overrides:
onEntityLandin classBlock- Mappings:
Namespace Name Mixin selector intermediary method_9502Lnet/minecraft/class_2248;method_9502(Lnet/minecraft/class_1922;Lnet/minecraft/class_1297;)Vofficial aLcpl;a(Lclq;Lbfh;)Vnamed onEntityLandLnet/minecraft/block/Block;onEntityLand(Lnet/minecraft/world/BlockView;Lnet/minecraft/entity/Entity;)V
-
bounceEntity
- Mappings:
Namespace Name Mixin selector intermediary method_21838Lnet/minecraft/class_2244;method_21838(Lnet/minecraft/class_1297;)Vofficial aLcpe;a(Lbfh;)Vnamed bounceEntityLnet/minecraft/block/BedBlock;bounceEntity(Lnet/minecraft/entity/Entity;)V
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.Returning
Blocks.AIRbreaks the block. This is useful to implement supporting block requirement for blocks (if used along withAbstractBlock.canPlaceAt(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.util.math.BlockPos)).Side effects like activating a redstone component (but not scheduling a tick) should be performed in
AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)instead. If the block supports waterlogging and currently has water, this method should be overridden to tick the fluid at the block's position.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient. This is not called ifBlock.FORCE_STATEflag is set in thesetBlockStatecall.This method can be used for multiple purposes. Here are some examples:
FenceBlockuses it to update the fence's connection when a horizontally neighboring block's state is changed.PlantBlockuses it to break the plant if the state change causes it to lose its supporting block.DoorBlockuses it to copy the state of the other half of the door.SlabBlockuses it to schedule the fluid to tick if waterlogged.SoulSandBlockuses it to schedule the water block above to tick so that it becomes a bubble column.FallingBlockuses it to schedule the block to tick so that it can fall if needed.
- Overrides:
getStateForNeighborUpdatein classAbstractBlock- Parameters:
state- the state of this blockdirection- the direction from this block to the neighborneighborState- the state of the updated neighbor blockworld- the worldpos- the position of this blockneighborPos- the position of the neighbor block- Returns:
- the state of the block after a neighboring block's state change
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;official aLdbx;a(Ldby;Lha;Ldby;Lcml;Lgu;Lgu;)Ldby;named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
getDirectionTowardsOtherPart
- Mappings:
Namespace Name Mixin selector intermediary method_9488Lnet/minecraft/class_2244;method_9488(Lnet/minecraft/class_2742;Lnet/minecraft/class_2350;)Lnet/minecraft/class_2350;official aLcpe;a(Ldcl;Lha;)Lha;named getDirectionTowardsOtherPartLnet/minecraft/block/BedBlock;getDirectionTowardsOtherPart(Lnet/minecraft/block/enums/BedPart;Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/Direction;
-
onBreak
Called when a player breaks a block before the block is removed from the world. Explosions do not trigger this.Default implementation spawns block breaking particles, angers piglins, and emits game events. Tall or wide blocks such as doors or beds should override this to break the other part (along with
AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos).)In most cases,
AbstractBlock.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean)orAbstractBlock.onStacksDropped(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, boolean)should be used instead. Note that they are called when blocks are broken by explosions as well as players breaking them.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient.- Overrides:
onBreakin classBlock- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_9576Lnet/minecraft/class_2248;method_9576(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1657;)Vofficial aLcpl;a(Lcmk;Lgu;Ldby;Lbym;)Vnamed onBreakLnet/minecraft/block/Block;onBreak(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;official aLcpl;a(Lcif;)Ldby;named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector intermediary method_9530Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;official aLdbx;a(Ldby;Lclq;Lgu;Leef;)Leet;named getOutlineShapeLnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
-
getOppositePartDirection
- Mappings:
Namespace Name Mixin selector intermediary method_24163Lnet/minecraft/class_2244;method_24163(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2350;official gLcpe;g(Ldby;)Lha;named getOppositePartDirectionLnet/minecraft/block/BedBlock;getOppositePartDirection(Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Direction;
-
getBedPart
- Mappings:
Namespace Name Mixin selector intermediary method_24164Lnet/minecraft/class_2244;method_24164(Lnet/minecraft/class_2680;)Lnet/minecraft/class_4732$class_4733;official hLcpe;h(Ldby;)Lcro$a;named getBedPartLnet/minecraft/block/BedBlock;getBedPart(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/DoubleBlockProperties$Type;
-
isBedBelow
- Mappings:
Namespace Name Mixin selector intermediary method_30839Lnet/minecraft/class_2244;method_30839(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Zofficial bLcpe;b(Lclq;Lgu;)Znamed isBedBelowLnet/minecraft/block/BedBlock;isBedBelow(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
-
findWakeUpPosition
public static Optional<Vec3d> findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, Direction bedDirection, float spawnAngle) - Mappings:
Namespace Name Mixin selector intermediary method_9484Lnet/minecraft/class_2244;method_9484(Lnet/minecraft/class_1299;Lnet/minecraft/class_1941;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;F)Ljava/util/Optional;official aLcpe;a(Lbfl;Lclu;Lgu;Lha;F)Ljava/util/Optional;named findWakeUpPositionLnet/minecraft/block/BedBlock;findWakeUpPosition(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/CollisionView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;F)Ljava/util/Optional;
-
findWakeUpPosition
private static Optional<Vec3d> findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, Direction bedDirection, Direction respawnDirection) - Mappings:
Namespace Name Mixin selector intermediary method_30835Lnet/minecraft/class_2244;method_30835(Lnet/minecraft/class_1299;Lnet/minecraft/class_1941;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_2350;)Ljava/util/Optional;official aLcpe;a(Lbfl;Lclu;Lgu;Lha;Lha;)Ljava/util/Optional;named findWakeUpPositionLnet/minecraft/block/BedBlock;findWakeUpPosition(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/CollisionView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/Direction;)Ljava/util/Optional;
-
findWakeUpPosition
private static Optional<Vec3d> findWakeUpPosition(EntityType<?> type, CollisionView world, BlockPos pos, int[][] possibleOffsets, boolean ignoreInvalidPos) - Mappings:
Namespace Name Mixin selector intermediary method_30836Lnet/minecraft/class_2244;method_30836(Lnet/minecraft/class_1299;Lnet/minecraft/class_1941;Lnet/minecraft/class_2338;[[IZ)Ljava/util/Optional;official aLcpe;a(Lbfl;Lclu;Lgu;[[IZ)Ljava/util/Optional;named findWakeUpPositionLnet/minecraft/block/BedBlock;findWakeUpPosition(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/CollisionView;Lnet/minecraft/util/math/BlockPos;[[IZ)Ljava/util/Optional;
-
getRenderType
Returns the block's render type (invisible, animated, model).- Overrides:
getRenderTypein classAbstractBlock- Returns:
- the block's render type (invisible, animated, model)
- Mappings:
Namespace Name Mixin selector intermediary method_9604Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;official b_Ldbx;b_(Ldby;)Lcvp;named getRenderTypeLnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector intermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vofficial aLcpl;a(Ldbz$a;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-
createBlockEntity
Returns a new block entity instance.For example:
@Override public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { return new MyBlockEntity(pos, state); }- Specified by:
createBlockEntityin interfaceBlockEntityProvider- Returns:
- a new block entity instance
- Mappings:
Namespace Name Mixin selector intermediary method_10123Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;official aLcrz;a(Lgu;Ldby;)Lczk;named createBlockEntityLnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, @Nullable @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.Tall or wide blocks (such as doors or beds) should override this to place the other half of the block. Blocks with block entities can use this to copy the data from the item stack, such as the custom name.
This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient.- Overrides:
onPlacedin classBlock- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_9567Lnet/minecraft/class_2248;method_9567(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Vofficial aLcpl;a(Lcmk;Lgu;Ldby;Lbfx;Lcfx;)Vnamed onPlacedLnet/minecraft/block/Block;onPlaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
-
getColor
- Mappings:
Namespace Name Mixin selector intermediary method_9487Lnet/minecraft/class_2244;method_9487()Lnet/minecraft/class_1767;official aLcpe;a()Lcel;named getColorLnet/minecraft/block/BedBlock;getColor()Lnet/minecraft/util/DyeColor;
-
getRenderingSeed
Returns the seed value for rendering.This is usually the hash code of
pos. Tall or wide blocks (such as doors or beds) should override this to make sure both parts of the block have the same seed.- Overrides:
getRenderingSeedin classAbstractBlock- Returns:
- the seed value for rendering
- Mappings:
Namespace Name Mixin selector intermediary method_9535Lnet/minecraft/class_4970;method_9535(Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;)Jofficial aLdbx;a(Ldby;Lgu;)Jnamed getRenderingSeedLnet/minecraft/block/AbstractBlock;getRenderingSeed(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;)J
-
getAroundAndOnBedOffsets
- Mappings:
Namespace Name Mixin selector intermediary method_30838Lnet/minecraft/class_2244;method_30838(Lnet/minecraft/class_2350;Lnet/minecraft/class_2350;)[[Iofficial aLcpe;a(Lha;Lha;)[[Inamed getAroundAndOnBedOffsetsLnet/minecraft/block/BedBlock;getAroundAndOnBedOffsets(Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/Direction;)[[I
-
getAroundBedOffsets
- Mappings:
Namespace Name Mixin selector intermediary method_30840Lnet/minecraft/class_2244;method_30840(Lnet/minecraft/class_2350;Lnet/minecraft/class_2350;)[[Iofficial bLcpe;b(Lha;Lha;)[[Inamed getAroundBedOffsetsLnet/minecraft/block/BedBlock;getAroundBedOffsets(Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/Direction;)[[I
-
getOnBedOffsets
- Mappings:
Namespace Name Mixin selector intermediary method_30837Lnet/minecraft/class_2244;method_30837(Lnet/minecraft/class_2350;)[[Iofficial aLcpe;a(Lha;)[[Inamed getOnBedOffsetsLnet/minecraft/block/BedBlock;getOnBedOffsets(Lnet/minecraft/util/math/Direction;)[[I
-