Class SkullBlockEntity
- Mappings:
Namespace Name named net/minecraft/block/entity/SkullBlockEntity
intermediary net/minecraft/class_2631
official dru
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccess
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
static final Executor
private static final Logger
private static @Nullable LoadingCache
<String, CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> private static final String
private @Nullable Identifier
private @Nullable ProfileComponent
private boolean
private int
private static final String
private static @Nullable LoadingCache
<UUID, CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addComponents
(ComponentMap.Builder componentMapBuilder) static void
static CompletableFuture
<Optional<com.mojang.authlib.GameProfile>> fetchProfileByName
(String name) (package private) static CompletableFuture
<Optional<com.mojang.authlib.GameProfile>> fetchProfileByName
(String name, ApiServices apiServices) static CompletableFuture
<Optional<com.mojang.authlib.GameProfile>> fetchProfileByUuid
(UUID uuid) (package private) static CompletableFuture
<Optional<com.mojang.authlib.GameProfile>> fetchProfileByUuid
(UUID uuid, ApiServices apiServices, BooleanSupplier booleanSupplier) getOwner()
float
getPoweredTicks
(float tickDelta) private void
protected void
readComponents
(BlockEntity.ComponentsAccess components) protected void
readNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt
.void
void
setOwner
(@Nullable ProfileComponent profile) static void
setServices
(ApiServices apiServices, Executor executor) static void
tick
(World world, BlockPos pos, BlockState state, SkullBlockEntity blockEntity) toInitialChunkDataNbt
(RegistryWrapper.WrapperLookup registryLookup) 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, ornull
to not send the packet.protected void
writeNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.BlockEntity
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, setCachedState, setComponents, setStackNbt, setWorld, tryParseCustomName, writeIdToNbt
-
Field Details
-
PROFILE_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named PROFILE_NBT_KEY
Lnet/minecraft/block/entity/SkullBlockEntity;PROFILE_NBT_KEY:Ljava/lang/String;
intermediary field_49762
Lnet/minecraft/class_2631;field_49762:Ljava/lang/String;
official b
Ldru;b:Ljava/lang/String;
-
NOTE_BLOCK_SOUND_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named NOTE_BLOCK_SOUND_NBT_KEY
Lnet/minecraft/block/entity/SkullBlockEntity;NOTE_BLOCK_SOUND_NBT_KEY:Ljava/lang/String;
intermediary field_41602
Lnet/minecraft/class_2631;field_41602:Ljava/lang/String;
official c
Ldru;c:Ljava/lang/String;
-
CUSTOM_NAME_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named CUSTOM_NAME_NBT_KEY
Lnet/minecraft/block/entity/SkullBlockEntity;CUSTOM_NAME_NBT_KEY:Ljava/lang/String;
intermediary field_49763
Lnet/minecraft/class_2631;field_49763:Ljava/lang/String;
official d
Ldru;d:Ljava/lang/String;
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/block/entity/SkullBlockEntity;LOGGER:Lorg/slf4j/Logger;
intermediary field_49764
Lnet/minecraft/class_2631;field_49764:Lorg/slf4j/Logger;
official e
Ldru;e:Lorg/slf4j/Logger;
-
currentExecutor
- Mappings:
Namespace Name Mixin selector named currentExecutor
Lnet/minecraft/block/entity/SkullBlockEntity;currentExecutor:Ljava/util/concurrent/Executor;
intermediary field_34029
Lnet/minecraft/class_2631;field_34029:Ljava/util/concurrent/Executor;
official f
Ldru;f:Ljava/util/concurrent/Executor;
-
nameToProfileCache
@Nullable private static @Nullable LoadingCache<String,CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> nameToProfileCache- Mappings:
Namespace Name Mixin selector named nameToProfileCache
Lnet/minecraft/block/entity/SkullBlockEntity;nameToProfileCache:Lcom/google/common/cache/LoadingCache;
intermediary field_51356
Lnet/minecraft/class_2631;field_51356:Lcom/google/common/cache/LoadingCache;
official g
Ldru;g:Lcom/google/common/cache/LoadingCache;
-
uuidToProfileCache
@Nullable private static @Nullable LoadingCache<UUID,CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> uuidToProfileCache- Mappings:
Namespace Name Mixin selector named uuidToProfileCache
Lnet/minecraft/block/entity/SkullBlockEntity;uuidToProfileCache:Lcom/google/common/cache/LoadingCache;
intermediary field_51357
Lnet/minecraft/class_2631;field_51357:Lcom/google/common/cache/LoadingCache;
official h
Ldru;h:Lcom/google/common/cache/LoadingCache;
-
EXECUTOR
- Mappings:
Namespace Name Mixin selector named EXECUTOR
Lnet/minecraft/block/entity/SkullBlockEntity;EXECUTOR:Ljava/util/concurrent/Executor;
intermediary field_45147
Lnet/minecraft/class_2631;field_45147:Ljava/util/concurrent/Executor;
official a
Ldru;a:Ljava/util/concurrent/Executor;
-
owner
- Mappings:
Namespace Name Mixin selector named owner
Lnet/minecraft/block/entity/SkullBlockEntity;owner:Lnet/minecraft/component/type/ProfileComponent;
intermediary field_12087
Lnet/minecraft/class_2631;field_12087:Lnet/minecraft/class_9296;
official i
Ldru;i:Lcxu;
-
noteBlockSound
- Mappings:
Namespace Name Mixin selector named noteBlockSound
Lnet/minecraft/block/entity/SkullBlockEntity;noteBlockSound:Lnet/minecraft/util/Identifier;
intermediary field_41603
Lnet/minecraft/class_2631;field_41603:Lnet/minecraft/class_2960;
official j
Ldru;j:Lakr;
-
poweredTicks
private int poweredTicks- Mappings:
Namespace Name Mixin selector named poweredTicks
Lnet/minecraft/block/entity/SkullBlockEntity;poweredTicks:I
intermediary field_41315
Lnet/minecraft/class_2631;field_41315:I
official k
Ldru;k:I
-
powered
private boolean powered- Mappings:
Namespace Name Mixin selector named powered
Lnet/minecraft/block/entity/SkullBlockEntity;powered:Z
intermediary field_41316
Lnet/minecraft/class_2631;field_41316:Z
official l
Ldru;l:Z
-
customName
- Mappings:
Namespace Name Mixin selector named customName
Lnet/minecraft/block/entity/SkullBlockEntity;customName:Lnet/minecraft/text/Text;
intermediary field_49765
Lnet/minecraft/class_2631;field_49765:Lnet/minecraft/class_2561;
official m
Ldru;m:Lwz;
-
-
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;)V
intermediary <init>
Lnet/minecraft/class_2631;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official <init>
Ldru;<init>(Ljd;Ldtc;)V
-
-
Method Details
-
setServices
- Mappings:
Namespace Name Mixin selector named setServices
Lnet/minecraft/block/entity/SkullBlockEntity;setServices(Lnet/minecraft/util/ApiServices;Ljava/util/concurrent/Executor;)V
intermediary method_39765
Lnet/minecraft/class_2631;method_39765(Lnet/minecraft/class_7497;Ljava/util/concurrent/Executor;)V
official a
Ldru;a(Lalm;Ljava/util/concurrent/Executor;)V
-
fetchProfileByName
static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfileByName(String name, ApiServices apiServices) - Mappings:
Namespace Name Mixin selector named fetchProfileByName
Lnet/minecraft/block/entity/SkullBlockEntity;fetchProfileByName(Ljava/lang/String;Lnet/minecraft/util/ApiServices;)Ljava/util/concurrent/CompletableFuture;
intermediary method_59536
Lnet/minecraft/class_2631;method_59536(Ljava/lang/String;Lnet/minecraft/class_7497;)Ljava/util/concurrent/CompletableFuture;
official a
Ldru;a(Ljava/lang/String;Lalm;)Ljava/util/concurrent/CompletableFuture;
-
fetchProfileByUuid
static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfileByUuid(UUID uuid, ApiServices apiServices, BooleanSupplier booleanSupplier) - Mappings:
Namespace Name Mixin selector named fetchProfileByUuid
Lnet/minecraft/block/entity/SkullBlockEntity;fetchProfileByUuid(Ljava/util/UUID;Lnet/minecraft/util/ApiServices;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;
intermediary method_59540
Lnet/minecraft/class_2631;method_59540(Ljava/util/UUID;Lnet/minecraft/class_7497;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;
official a
Ldru;a(Ljava/util/UUID;Lalm;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;
-
clearServices
public static void clearServices()- Mappings:
Namespace Name Mixin selector named clearServices
Lnet/minecraft/block/entity/SkullBlockEntity;clearServices()V
intermediary method_39766
Lnet/minecraft/class_2631;method_39766()V
official b
Ldru;b()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:
writeNbt
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named writeNbt
Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11007
Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official b
Ldqh;b(Lub;Ljo$a;)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.
nbt
might 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:
readNbt
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named readNbt
Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11014
Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official a
Ldqh;a(Lub;Ljo$a;)V
-
tick
- Mappings:
Namespace Name Mixin selector named tick
Lnet/minecraft/block/entity/SkullBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/SkullBlockEntity;)V
intermediary method_47589
Lnet/minecraft/class_2631;method_47589(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2631;)V
official a
Ldru;a(Ldcw;Ljd;Ldtc;Ldru;)V
-
getPoweredTicks
public float getPoweredTicks(float tickDelta) - Mappings:
Namespace Name Mixin selector named getPoweredTicks
Lnet/minecraft/block/entity/SkullBlockEntity;getPoweredTicks(F)F
intermediary method_47588
Lnet/minecraft/class_2631;method_47588(F)F
official a
Ldru;a(F)F
-
getOwner
- Mappings:
Namespace Name Mixin selector named getOwner
Lnet/minecraft/block/entity/SkullBlockEntity;getOwner()Lnet/minecraft/component/type/ProfileComponent;
intermediary method_11334
Lnet/minecraft/class_2631;method_11334()Lnet/minecraft/class_9296;
official c
Ldru;c()Lcxu;
-
getNoteBlockSound
- Mappings:
Namespace Name Mixin selector named getNoteBlockSound
Lnet/minecraft/block/entity/SkullBlockEntity;getNoteBlockSound()Lnet/minecraft/util/Identifier;
intermediary method_47888
Lnet/minecraft/class_2631;method_47888()Lnet/minecraft/class_2960;
official d
Ldru;d()Lakr;
-
toUpdatePacket
Description copied from class:BlockEntity
Returns the packet to send to nearby players when the block entity's observable state changes, ornull
to not send the packet.If the data returned by
initial chunk data
is 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:
toUpdatePacket
in classBlockEntity
- Returns:
- the packet to send to nearby players when the block entity's observable
state changes, or
null
to not send the packet - See Also:
- Mappings:
Namespace Name Mixin selector named toUpdatePacket
Lnet/minecraft/block/entity/SkullBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
intermediary method_38250
Lnet/minecraft/class_2631;method_38250()Lnet/minecraft/class_2622;
official f
Ldru;f()Lacb;
-
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:
toInitialChunkDataNbt
in classBlockEntity
- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector named toInitialChunkDataNbt
Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
intermediary method_16887
Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
official a
Ldqh;a(Ljo$a;)Lub;
-
setOwner
- Mappings:
Namespace Name Mixin selector named setOwner
Lnet/minecraft/block/entity/SkullBlockEntity;setOwner(Lnet/minecraft/component/type/ProfileComponent;)V
intermediary method_11333
Lnet/minecraft/class_2631;method_11333(Lnet/minecraft/class_9296;)V
official a
Ldru;a(Lcxu;)V
-
loadOwnerProperties
private void loadOwnerProperties()- Mappings:
Namespace Name Mixin selector named loadOwnerProperties
Lnet/minecraft/block/entity/SkullBlockEntity;loadOwnerProperties()V
intermediary method_11339
Lnet/minecraft/class_2631;method_11339()V
official j
Ldru;j()V
-
fetchProfileByName
public static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfileByName(String name) - Mappings:
Namespace Name Mixin selector named fetchProfileByName
Lnet/minecraft/block/entity/SkullBlockEntity;fetchProfileByName(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
intermediary method_52580
Lnet/minecraft/class_2631;method_52580(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
official a
Ldru;a(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
-
fetchProfileByUuid
public static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfileByUuid(UUID uuid) - Mappings:
Namespace Name Mixin selector named fetchProfileByUuid
Lnet/minecraft/block/entity/SkullBlockEntity;fetchProfileByUuid(Ljava/util/UUID;)Ljava/util/concurrent/CompletableFuture;
intermediary method_59539
Lnet/minecraft/class_2631;method_59539(Ljava/util/UUID;)Ljava/util/concurrent/CompletableFuture;
official a
Ldru;a(Ljava/util/UUID;)Ljava/util/concurrent/CompletableFuture;
-
readComponents
- Overrides:
readComponents
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named readComponents
Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/block/entity/BlockEntity$ComponentsAccess;)V
intermediary method_57568
Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_2586$class_9473;)V
official a
Ldqh;a(Ldqh$b;)V
-
addComponents
- Overrides:
addComponents
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named addComponents
Lnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
intermediary method_57567
Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)V
official a
Ldqh;a(Lkm$a;)V
-
removeFromCopiedStackNbt
- Overrides:
removeFromCopiedStackNbt
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named removeFromCopiedStackNbt
Lnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)V
intermediary method_57569
Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)V
official a
Ldqh;a(Lub;)V
-