Class SkullBlockEntity
- Mappings:
Namespace Name intermediary net/minecraft/class_2631official daunamed net/minecraft/block/entity/SkullBlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate @Nullable Identifierprivate @Nullable com.mojang.authlib.GameProfileprivate booleanprivate intprivate static @Nullable com.mojang.authlib.minecraft.MinecraftSessionServicestatic final StringFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void@Nullable com.mojang.authlib.GameProfilegetOwner()floatgetPoweredTicks(float tickDelta) private voidstatic voidloadProperties(@Nullable com.mojang.authlib.GameProfile owner, Consumer<com.mojang.authlib.GameProfile> callback) voidreadNbt(NbtCompound nbt) Reads data fromnbt.voidstatic voidsetServices(ApiServices apiServices, Executor executor) static voidtick(World world, BlockPos pos, BlockState state, SkullBlockEntity blockEntity) 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 voidwriteNbt(NbtCompound nbt) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, writeIdToNbt
-
Field Details
-
SKULL_OWNER_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_31363Lnet/minecraft/class_2631;field_31363:Ljava/lang/String;official aLdau;a:Ljava/lang/String;named SKULL_OWNER_KEYLnet/minecraft/block/entity/SkullBlockEntity;SKULL_OWNER_KEY:Ljava/lang/String;
-
NOTE_BLOCK_SOUND_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_41602Lnet/minecraft/class_2631;field_41602:Ljava/lang/String;official bLdau;b:Ljava/lang/String;named NOTE_BLOCK_SOUND_KEYLnet/minecraft/block/entity/SkullBlockEntity;NOTE_BLOCK_SOUND_KEY:Ljava/lang/String;
-
userCache
- Mappings:
Namespace Name Mixin selector intermediary field_12089Lnet/minecraft/class_2631;field_12089:Lnet/minecraft/class_3312;official cLdau;c:Lalg;named userCacheLnet/minecraft/block/entity/SkullBlockEntity;userCache:Lnet/minecraft/util/UserCache;
-
sessionService
@Nullable private static @Nullable com.mojang.authlib.minecraft.MinecraftSessionService sessionService- Mappings:
Namespace Name Mixin selector intermediary field_12088Lnet/minecraft/class_2631;field_12088:Lcom/mojang/authlib/minecraft/MinecraftSessionService;official dLdau;d:Lcom/mojang/authlib/minecraft/MinecraftSessionService;named sessionServiceLnet/minecraft/block/entity/SkullBlockEntity;sessionService:Lcom/mojang/authlib/minecraft/MinecraftSessionService;
-
executor
- Mappings:
Namespace Name Mixin selector intermediary field_34029Lnet/minecraft/class_2631;field_34029:Ljava/util/concurrent/Executor;official eLdau;e:Ljava/util/concurrent/Executor;named executorLnet/minecraft/block/entity/SkullBlockEntity;executor:Ljava/util/concurrent/Executor;
-
owner
- Mappings:
Namespace Name Mixin selector intermediary field_12087Lnet/minecraft/class_2631;field_12087:Lcom/mojang/authlib/GameProfile;official fLdau;f:Lcom/mojang/authlib/GameProfile;named ownerLnet/minecraft/block/entity/SkullBlockEntity;owner:Lcom/mojang/authlib/GameProfile;
-
noteBlockSound
- Mappings:
Namespace Name Mixin selector intermediary field_41603Lnet/minecraft/class_2631;field_41603:Lnet/minecraft/class_2960;official gLdau;g:Lacq;named noteBlockSoundLnet/minecraft/block/entity/SkullBlockEntity;noteBlockSound:Lnet/minecraft/util/Identifier;
-
poweredTicks
private int poweredTicks- Mappings:
Namespace Name Mixin selector intermediary field_41315Lnet/minecraft/class_2631;field_41315:Iofficial hLdau;h:Inamed poweredTicksLnet/minecraft/block/entity/SkullBlockEntity;poweredTicks:I
-
powered
private boolean powered- Mappings:
Namespace Name Mixin selector intermediary field_41316Lnet/minecraft/class_2631;field_41316:Zofficial iLdau;i:Znamed poweredLnet/minecraft/block/entity/SkullBlockEntity;powered:Z
-
-
Constructor Details
-
SkullBlockEntity
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_2631;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Ldau;<init>(Lgu;Ldby;)Vnamed <init>Lnet/minecraft/block/entity/SkullBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
setServices
- Mappings:
Namespace Name Mixin selector intermediary method_39765Lnet/minecraft/class_2631;method_39765(Lnet/minecraft/class_7497;Ljava/util/concurrent/Executor;)Vofficial aLdau;a(Ladh;Ljava/util/concurrent/Executor;)Vnamed setServicesLnet/minecraft/block/entity/SkullBlockEntity;setServices(Lnet/minecraft/util/ApiServices;Ljava/util/concurrent/Executor;)V
-
clearServices
public static void clearServices()- Mappings:
Namespace Name Mixin selector intermediary method_39766Lnet/minecraft/class_2631;method_39766()Vofficial cLdau;c()Vnamed clearServicesLnet/minecraft/block/entity/SkullBlockEntity;clearServices()V
-
writeNbt
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:
writeNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Vofficial bLczk;b(Lqr;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
readNbt
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:
readNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vofficial aLczk;a(Lqr;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
tick
- Mappings:
Namespace Name Mixin selector intermediary method_47589Lnet/minecraft/class_2631;method_47589(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2631;)Vofficial aLdau;a(Lcmk;Lgu;Ldby;Ldau;)Vnamed tickLnet/minecraft/block/entity/SkullBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/SkullBlockEntity;)V
-
getPoweredTicks
public float getPoweredTicks(float tickDelta) - Mappings:
Namespace Name Mixin selector intermediary method_47588Lnet/minecraft/class_2631;method_47588(F)Fofficial aLdau;a(F)Fnamed getPoweredTicksLnet/minecraft/block/entity/SkullBlockEntity;getPoweredTicks(F)F
-
getOwner
- Mappings:
Namespace Name Mixin selector intermediary method_11334Lnet/minecraft/class_2631;method_11334()Lcom/mojang/authlib/GameProfile;official dLdau;d()Lcom/mojang/authlib/GameProfile;named getOwnerLnet/minecraft/block/entity/SkullBlockEntity;getOwner()Lcom/mojang/authlib/GameProfile;
-
getNoteBlockSound
- Mappings:
Namespace Name Mixin selector intermediary method_47888Lnet/minecraft/class_2631;method_47888()Lnet/minecraft/class_2960;official fLdau;f()Lacq;named getNoteBlockSoundLnet/minecraft/block/entity/SkullBlockEntity;getNoteBlockSound()Lnet/minecraft/util/Identifier;
-
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)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 intermediary method_38250Lnet/minecraft/class_2631;method_38250()Lnet/minecraft/class_2622;official gLdau;g()Luz;named toUpdatePacketLnet/minecraft/block/entity/SkullBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
-
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
BlockEntity.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().- Overrides:
toInitialChunkDataNbtin classBlockEntity- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_16887Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;official ao_Lczk;ao_()Lqr;named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
-
setOwner
- Mappings:
Namespace Name Mixin selector intermediary method_11333Lnet/minecraft/class_2631;method_11333(Lcom/mojang/authlib/GameProfile;)Vofficial aLdau;a(Lcom/mojang/authlib/GameProfile;)Vnamed setOwnerLnet/minecraft/block/entity/SkullBlockEntity;setOwner(Lcom/mojang/authlib/GameProfile;)V
-
loadOwnerProperties
private void loadOwnerProperties()- Mappings:
Namespace Name Mixin selector intermediary method_11339Lnet/minecraft/class_2631;method_11339()Vofficial iLdau;i()Vnamed loadOwnerPropertiesLnet/minecraft/block/entity/SkullBlockEntity;loadOwnerProperties()V
-
loadProperties
public static void loadProperties(@Nullable @Nullable com.mojang.authlib.GameProfile owner, Consumer<com.mojang.authlib.GameProfile> callback) - Mappings:
Namespace Name Mixin selector intermediary method_11335Lnet/minecraft/class_2631;method_11335(Lcom/mojang/authlib/GameProfile;Ljava/util/function/Consumer;)Vofficial aLdau;a(Lcom/mojang/authlib/GameProfile;Ljava/util/function/Consumer;)Vnamed loadPropertiesLnet/minecraft/block/entity/SkullBlockEntity;loadProperties(Lcom/mojang/authlib/GameProfile;Ljava/util/function/Consumer;)V
-