Class SkullBlockEntity
- Mappings:
Namespace Name official doaintermediary net/minecraft/class_2631named net/minecraft/block/entity/SkullBlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Executorprivate static final Stringprivate static final Stringprivate static final Loggerprivate static final Stringprivate @Nullable Identifierprivate @Nullable ProfileComponentprivate booleanprivate intprivate static @Nullable LoadingCache<String, CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponents(ComponentMap.Builder componentMapBuilder) static voidstatic CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfile(String name) (package private) static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfile(String name, ApiServices apiServices, BooleanSupplier missingUserCache) getOwner()floatgetPoweredTicks(float tickDelta) private voidvoidreadComponents(ComponentMap components) voidreadNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt.voidvoidsetOwner(@Nullable ProfileComponent profileComponent) static voidsetServices(ApiServices apiServices, Executor executor) static voidtick(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, ornullto not send the packet.protected voidwriteNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, writeIdToNbt
-
Field Details
-
field_49762
- See Also:
- Mappings:
Namespace Name Mixin selector official bLdoa;b:Ljava/lang/String;intermediary field_49762Lnet/minecraft/class_2631;field_49762:Ljava/lang/String;named field_49762Lnet/minecraft/block/entity/SkullBlockEntity;field_49762:Ljava/lang/String;
-
NOTE_BLOCK_SOUND_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official cLdoa;c:Ljava/lang/String;intermediary field_41602Lnet/minecraft/class_2631;field_41602:Ljava/lang/String;named NOTE_BLOCK_SOUND_KEYLnet/minecraft/block/entity/SkullBlockEntity;NOTE_BLOCK_SOUND_KEY:Ljava/lang/String;
-
field_49763
- See Also:
- Mappings:
Namespace Name Mixin selector official dLdoa;d:Ljava/lang/String;intermediary field_49763Lnet/minecraft/class_2631;field_49763:Ljava/lang/String;named field_49763Lnet/minecraft/block/entity/SkullBlockEntity;field_49763:Ljava/lang/String;
-
field_49764
- Mappings:
Namespace Name Mixin selector official eLdoa;e:Lorg/slf4j/Logger;intermediary field_49764Lnet/minecraft/class_2631;field_49764:Lorg/slf4j/Logger;named field_49764Lnet/minecraft/block/entity/SkullBlockEntity;field_49764:Lorg/slf4j/Logger;
-
currentExecutor
- Mappings:
Namespace Name Mixin selector official fLdoa;f:Ljava/util/concurrent/Executor;intermediary field_34029Lnet/minecraft/class_2631;field_34029:Ljava/util/concurrent/Executor;named currentExecutorLnet/minecraft/block/entity/SkullBlockEntity;currentExecutor:Ljava/util/concurrent/Executor;
-
userCache
@Nullable private static @Nullable LoadingCache<String,CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> userCache- Mappings:
Namespace Name Mixin selector official gLdoa;g:Lcom/google/common/cache/LoadingCache;intermediary field_12089Lnet/minecraft/class_2631;field_12089:Lcom/google/common/cache/LoadingCache;named userCacheLnet/minecraft/block/entity/SkullBlockEntity;userCache:Lcom/google/common/cache/LoadingCache;
-
EXECUTOR
- Mappings:
Namespace Name Mixin selector official aLdoa;a:Ljava/util/concurrent/Executor;intermediary field_45147Lnet/minecraft/class_2631;field_45147:Ljava/util/concurrent/Executor;named EXECUTORLnet/minecraft/block/entity/SkullBlockEntity;EXECUTOR:Ljava/util/concurrent/Executor;
-
owner
- Mappings:
Namespace Name Mixin selector official hLdoa;h:Lcup;intermediary field_12087Lnet/minecraft/class_2631;field_12087:Lnet/minecraft/class_9296;named ownerLnet/minecraft/block/entity/SkullBlockEntity;owner:Lnet/minecraft/component/type/ProfileComponent;
-
noteBlockSound
- Mappings:
Namespace Name Mixin selector official iLdoa;i:Lajv;intermediary field_41603Lnet/minecraft/class_2631;field_41603:Lnet/minecraft/class_2960;named noteBlockSoundLnet/minecraft/block/entity/SkullBlockEntity;noteBlockSound:Lnet/minecraft/util/Identifier;
-
poweredTicks
private int poweredTicks- Mappings:
Namespace Name Mixin selector official jLdoa;j:Iintermediary field_41315Lnet/minecraft/class_2631;field_41315:Inamed poweredTicksLnet/minecraft/block/entity/SkullBlockEntity;poweredTicks:I
-
powered
private boolean powered- Mappings:
Namespace Name Mixin selector official kLdoa;k:Zintermediary field_41316Lnet/minecraft/class_2631;field_41316:Znamed poweredLnet/minecraft/block/entity/SkullBlockEntity;powered:Z
-
field_49765
- Mappings:
Namespace Name Mixin selector official lLdoa;l:Lwi;intermediary field_49765Lnet/minecraft/class_2631;field_49765:Lnet/minecraft/class_2561;named field_49765Lnet/minecraft/block/entity/SkullBlockEntity;field_49765:Lnet/minecraft/text/Text;
-
-
Constructor Details
-
SkullBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Ldoa;<init>(Lid;Ldpi;)Vintermediary <init>Lnet/minecraft/class_2631;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)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 official aLdoa;a(Lako;Ljava/util/concurrent/Executor;)Vintermediary method_39765Lnet/minecraft/class_2631;method_39765(Lnet/minecraft/class_7497;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 official bLdoa;b()Vintermediary method_39766Lnet/minecraft/class_2631;method_39766()Vnamed clearServicesLnet/minecraft/block/entity/SkullBlockEntity;clearServices()V
-
fetchProfile
static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfile(String name, ApiServices apiServices, BooleanSupplier missingUserCache) - Mappings:
Namespace Name Mixin selector official aLdoa;a(Ljava/lang/String;Lako;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;intermediary method_54081Lnet/minecraft/class_2631;method_54081(Ljava/lang/String;Lnet/minecraft/class_7497;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;named fetchProfileLnet/minecraft/block/entity/SkullBlockEntity;fetchProfile(Ljava/lang/String;Lnet/minecraft/util/ApiServices;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;
-
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 official bLdmo;b(Lto;Lip$a;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)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 official aLdmo;a(Lto;Lip$a;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
-
tick
- Mappings:
Namespace Name Mixin selector official aLdoa;a(Lczg;Lid;Ldpi;Ldoa;)Vintermediary method_47589Lnet/minecraft/class_2631;method_47589(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2631;)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 official aLdoa;a(F)Fintermediary method_47588Lnet/minecraft/class_2631;method_47588(F)Fnamed getPoweredTicksLnet/minecraft/block/entity/SkullBlockEntity;getPoweredTicks(F)F
-
getOwner
- Mappings:
Namespace Name Mixin selector official cLdoa;c()Lcup;intermediary method_11334Lnet/minecraft/class_2631;method_11334()Lnet/minecraft/class_9296;named getOwnerLnet/minecraft/block/entity/SkullBlockEntity;getOwner()Lnet/minecraft/component/type/ProfileComponent;
-
getNoteBlockSound
- Mappings:
Namespace Name Mixin selector official dLdoa;d()Lajv;intermediary method_47888Lnet/minecraft/class_2631;method_47888()Lnet/minecraft/class_2960;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, 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 official fLdoa;f()Labh;intermediary method_38250Lnet/minecraft/class_2631;method_38250()Lnet/minecraft/class_2622;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(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 official aLdmo;a(Lip$a;)Lto;intermediary method_16887Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
-
setOwner
- Mappings:
Namespace Name Mixin selector official aLdoa;a(Lcup;)Vintermediary method_11333Lnet/minecraft/class_2631;method_11333(Lnet/minecraft/class_9296;)Vnamed setOwnerLnet/minecraft/block/entity/SkullBlockEntity;setOwner(Lnet/minecraft/component/type/ProfileComponent;)V
-
loadOwnerProperties
private void loadOwnerProperties()- Mappings:
Namespace Name Mixin selector official jLdoa;j()Vintermediary method_11339Lnet/minecraft/class_2631;method_11339()Vnamed loadOwnerPropertiesLnet/minecraft/block/entity/SkullBlockEntity;loadOwnerProperties()V
-
fetchProfile
- Mappings:
Namespace Name Mixin selector official aLdoa;a(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;intermediary method_52580Lnet/minecraft/class_2631;method_52580(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;named fetchProfileLnet/minecraft/block/entity/SkullBlockEntity;fetchProfile(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
-
readComponents
- Overrides:
readComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector official aLdmo;a(Ljn;)Vintermediary method_57568Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9323;)Vnamed readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentMap;)V
-
addComponents
- Overrides:
addComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector official aLdmo;a(Ljn$a;)Vintermediary method_57567Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)Vnamed addComponentsLnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
-
removeFromCopiedStackNbt
- Overrides:
removeFromCopiedStackNbtin classBlockEntity- Mappings:
Namespace Name Mixin selector official aLdmo;a(Lto;)Vintermediary method_57569Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)Vnamed removeFromCopiedStackNbtLnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)V
-