Package net.minecraft.block.entity
Class BedBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.BedBlockEntity
- Mappings:
Namespace Name named net/minecraft/block/entity/BedBlockEntityintermediary net/minecraft/class_2587official dqd
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccess -
Field Summary
FieldsFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
ConstructorsConstructorDescriptionBedBlockEntity(BlockPos pos, BlockState state) BedBlockEntity(BlockPos pos, BlockState state, DyeColor color) -
Method Summary
Modifier and TypeMethodDescriptiongetColor()voidReturns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.Methods inherited from class net.minecraft.block.entity.BlockEntity
addComponents, cancelRemoval, copyItemDataRequiresOperator, createComponentlessNbt, createComponentlessNbtWithIdentifyingData, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getComponents, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessNbt, readComponents, readComponents, readComponents, readNbt, removeFromCopiedStackNbt, setCachedState, setComponents, setStackNbt, setWorld, toInitialChunkDataNbt, tryParseCustomName, writeIdToNbt, writeNbt
-
Field Details
-
color
- Mappings:
Namespace Name Mixin selector named colorLnet/minecraft/block/entity/BedBlockEntity;color:Lnet/minecraft/util/DyeColor;intermediary field_11869Lnet/minecraft/class_2587;field_11869:Lnet/minecraft/class_1767;official aLdqd;a:Lcti;
-
-
Constructor Details
-
BedBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/entity/BedBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary <init>Lnet/minecraft/class_2587;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Ldqd;<init>(Ljd;Ldtc;)V
-
BedBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/entity/BedBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/DyeColor;)Vintermediary <init>Lnet/minecraft/class_2587;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1767;)Vofficial <init>Ldqd;<init>(Ljd;Ldtc;Lcti;)V
-
-
Method Details
-
toUpdatePacket
Description copied from class:BlockEntityReturns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.If the data returned by
initial chunk datais suitable for updates, the following shortcut can be used to create an update packet:BlockEntityUpdateS2CPacket.create(this). The NBT will be passed toBlockEntity.readNbt(net.minecraft.nbt.NbtCompound, net.minecraft.registry.RegistryWrapper.WrapperLookup)on the client."Observable state" is a state that clients can observe without specific interaction. For example,
CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.To sync block entity data using this method, use
serverWorld.getChunkManager().markForUpdate(this.getPos());.- Overrides:
toUpdatePacketin classBlockEntity- Returns:
- the packet to send to nearby players when the block entity's observable
state changes, or
nullto not send the packet - See Also:
- Mappings:
Namespace Name Mixin selector named toUpdatePacketLnet/minecraft/block/entity/BedBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;intermediary method_38237Lnet/minecraft/class_2587;method_38237()Lnet/minecraft/class_2622;official bLdqd;b()Lacb;
-
getColor
- Mappings:
Namespace Name Mixin selector named getColorLnet/minecraft/block/entity/BedBlockEntity;getColor()Lnet/minecraft/util/DyeColor;intermediary method_11018Lnet/minecraft/class_2587;method_11018()Lnet/minecraft/class_1767;official cLdqd;c()Lcti;
-
setColor
- Mappings:
Namespace Name Mixin selector named setColorLnet/minecraft/block/entity/BedBlockEntity;setColor(Lnet/minecraft/util/DyeColor;)Vintermediary method_11019Lnet/minecraft/class_2587;method_11019(Lnet/minecraft/class_1767;)Vofficial aLdqd;a(Lcti;)V
-