Class SkullBlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.SkullBlockEntity

public class SkullBlockEntity extends BlockEntity
Mappings:
Namespace Name
official dig
intermediary net/minecraft/class_2631
named net/minecraft/block/entity/SkullBlockEntity
  • Field Details

    • SKULL_OWNER_KEY

      public static final String SKULL_OWNER_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ldig;a:Ljava/lang/String;
      intermediary field_31363 Lnet/minecraft/class_2631;field_31363:Ljava/lang/String;
      named SKULL_OWNER_KEY Lnet/minecraft/block/entity/SkullBlockEntity;SKULL_OWNER_KEY:Ljava/lang/String;
    • NOTE_BLOCK_SOUND_KEY

      public static final String NOTE_BLOCK_SOUND_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Ldig;b:Ljava/lang/String;
      intermediary field_41602 Lnet/minecraft/class_2631;field_41602:Ljava/lang/String;
      named NOTE_BLOCK_SOUND_KEY Lnet/minecraft/block/entity/SkullBlockEntity;NOTE_BLOCK_SOUND_KEY:Ljava/lang/String;
    • currentExecutor

      @Nullable private static @Nullable Executor currentExecutor
      Mappings:
      Namespace Name Mixin selector
      official c Ldig;c:Ljava/util/concurrent/Executor;
      intermediary field_34029 Lnet/minecraft/class_2631;field_34029:Ljava/util/concurrent/Executor;
      named currentExecutor Lnet/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 d Ldig;d:Lcom/google/common/cache/LoadingCache;
      intermediary field_12089 Lnet/minecraft/class_2631;field_12089:Lcom/google/common/cache/LoadingCache;
      named userCache Lnet/minecraft/block/entity/SkullBlockEntity;userCache:Lcom/google/common/cache/LoadingCache;
    • EXECUTOR

      private static final Executor EXECUTOR
      Mappings:
      Namespace Name Mixin selector
      official e Ldig;e:Ljava/util/concurrent/Executor;
      intermediary field_45147 Lnet/minecraft/class_2631;field_45147:Ljava/util/concurrent/Executor;
      named EXECUTOR Lnet/minecraft/block/entity/SkullBlockEntity;EXECUTOR:Ljava/util/concurrent/Executor;
    • owner

      @Nullable private @Nullable com.mojang.authlib.GameProfile owner
      Mappings:
      Namespace Name Mixin selector
      official f Ldig;f:Lcom/mojang/authlib/GameProfile;
      intermediary field_12087 Lnet/minecraft/class_2631;field_12087:Lcom/mojang/authlib/GameProfile;
      named owner Lnet/minecraft/block/entity/SkullBlockEntity;owner:Lcom/mojang/authlib/GameProfile;
    • noteBlockSound

      @Nullable private @Nullable Identifier noteBlockSound
      Mappings:
      Namespace Name Mixin selector
      official g Ldig;g:Lahg;
      intermediary field_41603 Lnet/minecraft/class_2631;field_41603:Lnet/minecraft/class_2960;
      named noteBlockSound Lnet/minecraft/block/entity/SkullBlockEntity;noteBlockSound:Lnet/minecraft/util/Identifier;
    • poweredTicks

      private int poweredTicks
      Mappings:
      Namespace Name Mixin selector
      official h Ldig;h:I
      intermediary field_41315 Lnet/minecraft/class_2631;field_41315:I
      named poweredTicks Lnet/minecraft/block/entity/SkullBlockEntity;poweredTicks:I
    • powered

      private boolean powered
      Mappings:
      Namespace Name Mixin selector
      official i Ldig;i:Z
      intermediary field_41316 Lnet/minecraft/class_2631;field_41316:Z
      named powered Lnet/minecraft/block/entity/SkullBlockEntity;powered:Z
  • Constructor Details

    • SkullBlockEntity

      public SkullBlockEntity(BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldig;<init>(Lhx;Ldjh;)V
      intermediary <init> Lnet/minecraft/class_2631;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      named <init> Lnet/minecraft/block/entity/SkullBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
  • Method Details

    • setServices

      public static void setServices(ApiServices apiServices, Executor executor)
      Mappings:
      Namespace Name Mixin selector
      official a Ldig;a(Lahz;Ljava/util/concurrent/Executor;)V
      intermediary method_39765 Lnet/minecraft/class_2631;method_39765(Lnet/minecraft/class_7497;Ljava/util/concurrent/Executor;)V
      named setServices Lnet/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 c Ldig;c()V
      intermediary method_39766 Lnet/minecraft/class_2631;method_39766()V
      named clearServices Lnet/minecraft/block/entity/SkullBlockEntity;clearServices()V
    • fetchProfile

      static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfile(String name, ApiServices apiServices, BooleanSupplier booleanSupplier)
      Mappings:
      Namespace Name Mixin selector
      official a Ldig;a(Ljava/lang/String;Lahz;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_54081 Lnet/minecraft/class_2631;method_54081(Ljava/lang/String;Lnet/minecraft/class_7497;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;
      named fetchProfile Lnet/minecraft/block/entity/SkullBlockEntity;fetchProfile(Ljava/lang/String;Lnet/minecraft/util/ApiServices;Ljava/util/function/BooleanSupplier;)Ljava/util/concurrent/CompletableFuture;
    • writeNbt

      protected void writeNbt(NbtCompound nbt)
      Writes data to nbt. 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 class BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Ldgv;b(Lsn;)V
      intermediary method_11007 Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)V
      named writeNbt Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • readNbt

      public void readNbt(NbtCompound nbt)
      Reads data from nbt. 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 class BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ldgv;a(Lsn;)V
      intermediary method_11014 Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)V
      named readNbt Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • tick

      public static void tick(World world, BlockPos pos, BlockState state, SkullBlockEntity blockEntity)
      Mappings:
      Namespace Name Mixin selector
      official a Ldig;a(Lctp;Lhx;Ldjh;Ldig;)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
      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
    • getPoweredTicks

      public float getPoweredTicks(float tickDelta)
      Mappings:
      Namespace Name Mixin selector
      official a Ldig;a(F)F
      intermediary method_47588 Lnet/minecraft/class_2631;method_47588(F)F
      named getPoweredTicks Lnet/minecraft/block/entity/SkullBlockEntity;getPoweredTicks(F)F
    • getOwner

      @Nullable public @Nullable com.mojang.authlib.GameProfile getOwner()
      Mappings:
      Namespace Name Mixin selector
      official d Ldig;d()Lcom/mojang/authlib/GameProfile;
      intermediary method_11334 Lnet/minecraft/class_2631;method_11334()Lcom/mojang/authlib/GameProfile;
      named getOwner Lnet/minecraft/block/entity/SkullBlockEntity;getOwner()Lcom/mojang/authlib/GameProfile;
    • getNoteBlockSound

      @Nullable public @Nullable Identifier getNoteBlockSound()
      Mappings:
      Namespace Name Mixin selector
      official f Ldig;f()Lahg;
      intermediary method_47888 Lnet/minecraft/class_2631;method_47888()Lnet/minecraft/class_2960;
      named getNoteBlockSound Lnet/minecraft/block/entity/SkullBlockEntity;getNoteBlockSound()Lnet/minecraft/util/Identifier;
    • toUpdatePacket

      public BlockEntityUpdateS2CPacket toUpdatePacket()
      Description copied from class: BlockEntity
      Returns the packet to send to nearby players when the block entity's observable state changes, or null 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 to BlockEntity.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:
      toUpdatePacket in class BlockEntity
      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
      official g Ldig;g()Lzh;
      intermediary method_38250 Lnet/minecraft/class_2631;method_38250()Lnet/minecraft/class_2622;
      named toUpdatePacket Lnet/minecraft/block/entity/SkullBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
    • toInitialChunkDataNbt

      public NbtCompound 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 default BlockEntityUpdateS2CPacket.

      "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:
      toInitialChunkDataNbt in class BlockEntity
      Returns:
      the serialized state of this block entity that is observable by clients
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official ax_ Ldgv;ax_()Lsn;
      intermediary method_16887 Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;
      named toInitialChunkDataNbt Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
    • setOwner

      public void setOwner(@Nullable @Nullable com.mojang.authlib.GameProfile owner)
      Mappings:
      Namespace Name Mixin selector
      official a Ldig;a(Lcom/mojang/authlib/GameProfile;)V
      intermediary method_11333 Lnet/minecraft/class_2631;method_11333(Lcom/mojang/authlib/GameProfile;)V
      named setOwner Lnet/minecraft/block/entity/SkullBlockEntity;setOwner(Lcom/mojang/authlib/GameProfile;)V
    • loadOwnerProperties

      private void loadOwnerProperties()
      Mappings:
      Namespace Name Mixin selector
      official k Ldig;k()V
      intermediary method_11339 Lnet/minecraft/class_2631;method_11339()V
      named loadOwnerProperties Lnet/minecraft/block/entity/SkullBlockEntity;loadOwnerProperties()V
    • getProfile

      @Nullable public static @Nullable com.mojang.authlib.GameProfile getProfile(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      official d Ldig;d(Lsn;)Lcom/mojang/authlib/GameProfile;
      intermediary method_52589 Lnet/minecraft/class_2631;method_52589(Lnet/minecraft/class_2487;)Lcom/mojang/authlib/GameProfile;
      named getProfile Lnet/minecraft/block/entity/SkullBlockEntity;getProfile(Lnet/minecraft/nbt/NbtCompound;)Lcom/mojang/authlib/GameProfile;
    • fillSkullOwner

      public static void fillSkullOwner(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      official e Ldig;e(Lsn;)V
      intermediary method_52590 Lnet/minecraft/class_2631;method_52590(Lnet/minecraft/class_2487;)V
      named fillSkullOwner Lnet/minecraft/block/entity/SkullBlockEntity;fillSkullOwner(Lnet/minecraft/nbt/NbtCompound;)V
    • fillSkullOwner

      private static void fillSkullOwner(NbtCompound nbt, String name)
      Mappings:
      Namespace Name Mixin selector
      official a Ldig;a(Lsn;Ljava/lang/String;)V
      intermediary method_52582 Lnet/minecraft/class_2631;method_52582(Lnet/minecraft/class_2487;Ljava/lang/String;)V
      named fillSkullOwner Lnet/minecraft/block/entity/SkullBlockEntity;fillSkullOwner(Lnet/minecraft/nbt/NbtCompound;Ljava/lang/String;)V
    • fetchProfile

      private static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfile(String name)
      Mappings:
      Namespace Name Mixin selector
      official a Ldig;a(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_52580 Lnet/minecraft/class_2631;method_52580(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
      named fetchProfile Lnet/minecraft/block/entity/SkullBlockEntity;fetchProfile(Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
    • hasTextures

      private static boolean hasTextures(com.mojang.authlib.GameProfile profile)
      Mappings:
      Namespace Name Mixin selector
      official b Ldig;b(Lcom/mojang/authlib/GameProfile;)Z
      intermediary method_52586 Lnet/minecraft/class_2631;method_52586(Lcom/mojang/authlib/GameProfile;)Z
      named hasTextures Lnet/minecraft/block/entity/SkullBlockEntity;hasTextures(Lcom/mojang/authlib/GameProfile;)Z