Class SkullBlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.SkullBlockEntity
All Implemented Interfaces:
DebugTrackable

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

    • PROFILE_NBT_KEY

      private static final String 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 a Lehz;a:Ljava/lang/String;
    • NOTE_BLOCK_SOUND_NBT_KEY

      private static final 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 b Lehz;b:Ljava/lang/String;
    • CUSTOM_NAME_NBT_KEY

      private static final 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 c Lehz;c:Ljava/lang/String;
    • 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 d Lehz;d:Ldkq;
    • noteBlockSound

      @Nullable private @Nullable Identifier 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 e Lehz;e:Lamj;
    • 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 f Lehz;f: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 g Lehz;g:Z
    • customName

      @Nullable private @Nullable Text 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 h Lehz;h:Lxx;
  • Constructor Details

    • SkullBlockEntity

      public SkullBlockEntity(BlockPos pos, BlockState state)
      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> Lehz;<init>(Lja;Lejm;)V
  • Method Details

    • writeData

      protected void writeData(WriteView view)
      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:
      writeData in class BlockEntity
      See Also:
      • invalid reference
        #readNbt
      Mappings:
      Namespace Name Mixin selector
      named writeData Lnet/minecraft/block/entity/BlockEntity;writeData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_11007 Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_11372;)V
      official a Legg;a(Lfir;)V
    • readData

      protected void readData(ReadView view)
      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:
      readData in class BlockEntity
      See Also:
      • invalid reference
        #writeNbt
      Mappings:
      Namespace Name Mixin selector
      named readData Lnet/minecraft/block/entity/BlockEntity;readData(Lnet/minecraft/storage/ReadView;)V
      intermediary method_11014 Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_11368;)V
      official a Legg;a(Lfip;)V
    • tick

      public static void tick(World world, BlockPos pos, BlockState state, SkullBlockEntity blockEntity)
      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 Lehz;a(Ldrq;Lja;Lejm;Lehz;)V
    • getPoweredTicks

      public float getPoweredTicks(float tickProgress)
      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 Lehz;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 a Lehz;a()Ldkq;
    • getNoteBlockSound

      @Nullable public @Nullable Identifier 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 c Lehz;c()Lamj;
    • 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

      invalid reference
      #readNbt
      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
      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 d Lehz;d()Lacx;
    • toInitialChunkDataNbt

      public NbtCompound toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registries)
      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 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(net.minecraft.registry.RegistryWrapper.WrapperLookup).

      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
      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 Legg;a(Ljm$a;)Lup;
    • readComponents

      protected void readComponents(ComponentsAccess components)
      Overrides:
      readComponents in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named readComponents Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentsAccess;)V
      intermediary method_57568 Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9473;)V
      official a Legg;a(Lkk;)V
    • addComponents

      protected void addComponents(ComponentMap.Builder builder)
      Overrides:
      addComponents in class BlockEntity
      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 Legg;a(Lkm$a;)V
    • removeFromCopiedStackData

      public void removeFromCopiedStackData(WriteView view)
      Overrides:
      removeFromCopiedStackData in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named removeFromCopiedStackData Lnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_57569 Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_11372;)V
      official b Legg;b(Lfir;)V