Class SkullBlockEntity
- All Implemented Interfaces:
DebugTrackable
- Mappings:
Namespace Name named net/minecraft/block/entity/SkullBlockEntityintermediary net/minecraft/class_2631official ehz
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.debug.DebugTrackable
DebugTrackable.DebugDataSupplier<T>, DebugTrackable.Tracker -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate @Nullable Identifierprivate @Nullable ProfileComponentprivate booleanprivate intprivate static final StringFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddComponents(ComponentMap.Builder builder) getOwner()floatgetPoweredTicks(float tickProgress) protected voidreadComponents(ComponentsAccess components) protected voidReads data fromnbt.voidstatic voidtick(World world, BlockPos pos, BlockState state, SkullBlockEntity blockEntity) toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registries) Returns the serialized state of this block entity that is observable by clients.Returns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.protected voidWrites data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, createComponentlessNbt, createComponentMap, createFromNbt, createNbt, createNbtWithIdentifyingData, getCachedState, getComponents, getNameForReport, getPos, getReporterContext, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onBlockReplaced, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessData, readComponents, readComponents, registerTracking, setCachedState, setComponents, setWorld, supports, tryParseCustomName, writeComponentlessData, writeDataWithId, writeDataWithoutId, writeFullData, writeId
-
Field Details
-
PROFILE_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named PROFILE_NBT_KEYLnet/minecraft/block/entity/SkullBlockEntity;PROFILE_NBT_KEY:Ljava/lang/String;intermediary field_49762Lnet/minecraft/class_2631;field_49762:Ljava/lang/String;official aLehz;a:Ljava/lang/String;
-
NOTE_BLOCK_SOUND_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named NOTE_BLOCK_SOUND_NBT_KEYLnet/minecraft/block/entity/SkullBlockEntity;NOTE_BLOCK_SOUND_NBT_KEY:Ljava/lang/String;intermediary field_41602Lnet/minecraft/class_2631;field_41602:Ljava/lang/String;official bLehz;b:Ljava/lang/String;
-
CUSTOM_NAME_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named CUSTOM_NAME_NBT_KEYLnet/minecraft/block/entity/SkullBlockEntity;CUSTOM_NAME_NBT_KEY:Ljava/lang/String;intermediary field_49763Lnet/minecraft/class_2631;field_49763:Ljava/lang/String;official cLehz;c:Ljava/lang/String;
-
owner
- Mappings:
Namespace Name Mixin selector named ownerLnet/minecraft/block/entity/SkullBlockEntity;owner:Lnet/minecraft/component/type/ProfileComponent;intermediary field_12087Lnet/minecraft/class_2631;field_12087:Lnet/minecraft/class_9296;official dLehz;d:Ldkq;
-
noteBlockSound
- Mappings:
Namespace Name Mixin selector named noteBlockSoundLnet/minecraft/block/entity/SkullBlockEntity;noteBlockSound:Lnet/minecraft/util/Identifier;intermediary field_41603Lnet/minecraft/class_2631;field_41603:Lnet/minecraft/class_2960;official eLehz;e:Lamj;
-
poweredTicks
private int poweredTicks- Mappings:
Namespace Name Mixin selector named poweredTicksLnet/minecraft/block/entity/SkullBlockEntity;poweredTicks:Iintermediary field_41315Lnet/minecraft/class_2631;field_41315:Iofficial fLehz;f:I
-
powered
private boolean powered- Mappings:
Namespace Name Mixin selector named poweredLnet/minecraft/block/entity/SkullBlockEntity;powered:Zintermediary field_41316Lnet/minecraft/class_2631;field_41316:Zofficial gLehz;g:Z
-
customName
- Mappings:
Namespace Name Mixin selector named customNameLnet/minecraft/block/entity/SkullBlockEntity;customName:Lnet/minecraft/text/Text;intermediary field_49765Lnet/minecraft/class_2631;field_49765:Lnet/minecraft/class_2561;official hLehz;h:Lxx;
-
-
Constructor Details
-
SkullBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/entity/SkullBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary <init>Lnet/minecraft/class_2631;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Lehz;<init>(Lja;Lejm;)V
-
-
Method Details
-
writeData
Writes data tonbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
- Overrides:
writeDatain classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named writeDataLnet/minecraft/block/entity/BlockEntity;writeData(Lnet/minecraft/storage/WriteView;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_11372;)Vofficial aLegg;a(Lfir;)V
-
readData
Reads data fromnbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
nbtmight not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readDatain classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named readDataLnet/minecraft/block/entity/BlockEntity;readData(Lnet/minecraft/storage/ReadView;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_11368;)Vofficial aLegg;a(Lfip;)V
-
tick
- Mappings:
Namespace Name Mixin selector named tickLnet/minecraft/block/entity/SkullBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/SkullBlockEntity;)Vintermediary method_47589Lnet/minecraft/class_2631;method_47589(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2631;)Vofficial aLehz;a(Ldrq;Lja;Lejm;Lehz;)V
-
getPoweredTicks
public float getPoweredTicks(float tickProgress) - Mappings:
Namespace Name Mixin selector named getPoweredTicksLnet/minecraft/block/entity/SkullBlockEntity;getPoweredTicks(F)Fintermediary method_47588Lnet/minecraft/class_2631;method_47588(F)Fofficial aLehz;a(F)F
-
getOwner
- Mappings:
Namespace Name Mixin selector named getOwnerLnet/minecraft/block/entity/SkullBlockEntity;getOwner()Lnet/minecraft/component/type/ProfileComponent;intermediary method_11334Lnet/minecraft/class_2631;method_11334()Lnet/minecraft/class_9296;official aLehz;a()Ldkq;
-
getNoteBlockSound
- Mappings:
Namespace Name Mixin selector named getNoteBlockSoundLnet/minecraft/block/entity/SkullBlockEntity;getNoteBlockSound()Lnet/minecraft/util/Identifier;intermediary method_47888Lnet/minecraft/class_2631;method_47888()Lnet/minecraft/class_2960;official cLehz;c()Lamj;
-
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 toon the client.invalid reference
#readNbt"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/SkullBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;intermediary method_38250Lnet/minecraft/class_2631;method_38250()Lnet/minecraft/class_2622;official dLehz;d()Lacx;
-
toInitialChunkDataNbt
Returns the serialized state of this block entity that is observable by clients.This is sent alongside the initial chunk data, as well as when the block entity implements
toUpdatePacket()and decides to use the defaultBlockEntityUpdateS2CPacket."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 send all NBT data of this block entity saved to disk, return
BlockEntity.createNbt(net.minecraft.registry.RegistryWrapper.WrapperLookup).- Overrides:
toInitialChunkDataNbtin classBlockEntity- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_16887Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official aLegg;a(Ljm$a;)Lup;
-
readComponents
- Overrides:
readComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector named readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_57568Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9473;)Vofficial aLegg;a(Lkk;)V
-
addComponents
- Overrides:
addComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector named addComponentsLnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)Vintermediary method_57567Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)Vofficial aLegg;a(Lkm$a;)V
-
removeFromCopiedStackData
- Overrides:
removeFromCopiedStackDatain classBlockEntity- Mappings:
Namespace Name Mixin selector named removeFromCopiedStackDataLnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackData(Lnet/minecraft/storage/WriteView;)Vintermediary method_57569Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_11372;)Vofficial bLegg;b(Lfir;)V
-