Package net.minecraft

Class class_9199


public class class_9199 extends BlockEntity
Mappings:
Namespace Name
official dlm
intermediary net/minecraft/class_9199
named net/minecraft/class_9199
  • Field Details

    • field_48865

      private static final Logger field_48865
      Mappings:
      Namespace Name Mixin selector
      official a Ldlm;a:Lorg/slf4j/Logger;
      intermediary field_48865 Lnet/minecraft/class_9199;field_48865:Lorg/slf4j/Logger;
      named field_48865 Lnet/minecraft/class_9199;field_48865:Lorg/slf4j/Logger;
    • field_48866

      private final class_9204 field_48866
      Mappings:
      Namespace Name Mixin selector
      official b Ldlm;b:Ldlp;
      intermediary field_48866 Lnet/minecraft/class_9199;field_48866:Lnet/minecraft/class_9204;
      named field_48866 Lnet/minecraft/class_9199;field_48866:Lnet/minecraft/class_9204;
    • field_48867

      private final class_9205 field_48867
      Mappings:
      Namespace Name Mixin selector
      official c Ldlm;c:Ldlq;
      intermediary field_48867 Lnet/minecraft/class_9199;field_48867:Lnet/minecraft/class_9205;
      named field_48867 Lnet/minecraft/class_9199;field_48867:Lnet/minecraft/class_9205;
    • field_48868

      private final class_9202 field_48868
      Mappings:
      Namespace Name Mixin selector
      official d Ldlm;d:Ldln;
      intermediary field_48868 Lnet/minecraft/class_9199;field_48868:Lnet/minecraft/class_9202;
      named field_48868 Lnet/minecraft/class_9199;field_48868:Lnet/minecraft/class_9202;
    • field_48869

      private class_9203 field_48869
      Mappings:
      Namespace Name Mixin selector
      official e Ldlm;e:Ldlo;
      intermediary field_48869 Lnet/minecraft/class_9199;field_48869:Lnet/minecraft/class_9203;
      named field_48869 Lnet/minecraft/class_9199;field_48869:Lnet/minecraft/class_9203;
  • Constructor Details

  • Method Details

    • toUpdatePacket

      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, 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 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 az_ Ldjl;az_()Lxz;
      intermediary method_38235 Lnet/minecraft/class_2586;method_38235()Lnet/minecraft/class_2596;
      named toUpdatePacket Lnet/minecraft/block/entity/BlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/Packet;
    • toInitialChunkDataNbt

      public NbtCompound toInitialChunkDataNbt(RegistryWrapper.WrapperLookup wrapperLookup)
      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(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
      official a Ldjl;a(Lin$a;)Lsy;
      intermediary method_16887 Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      named toInitialChunkDataNbt Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
    • writeNbt

      protected void writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup wrapperLookup)
      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 Ldjl;b(Lsy;Lin$a;)V
      intermediary method_11007 Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
      named writeNbt Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
    • method_56729

      private static <T> NbtElement method_56729(com.mojang.serialization.Codec<T> codec, T t)
      Mappings:
      Namespace Name Mixin selector
      official a Ldlm;a(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)Ltv;
      intermediary method_56729 Lnet/minecraft/class_9199;method_56729(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)Lnet/minecraft/class_2520;
      named method_56729 Lnet/minecraft/class_9199;method_56729(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)Lnet/minecraft/nbt/NbtElement;
    • readNbt

      public void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup wrapperLookup)
      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 Ldjl;a(Lsy;Lin$a;)V
      intermediary method_11014 Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
      named readNbt Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
    • method_56731

      @Nullable public @Nullable class_9204 method_56731()
      Mappings:
      Namespace Name Mixin selector
      official b Ldlm;b()Ldlp;
      intermediary method_56731 Lnet/minecraft/class_9199;method_56731()Lnet/minecraft/class_9204;
      named method_56731 Lnet/minecraft/class_9199;method_56731()Lnet/minecraft/class_9204;
    • method_56735

      public class_9205 method_56735()
      Mappings:
      Namespace Name Mixin selector
      official c Ldlm;c()Ldlq;
      intermediary method_56735 Lnet/minecraft/class_9199;method_56735()Lnet/minecraft/class_9205;
      named method_56735 Lnet/minecraft/class_9199;method_56735()Lnet/minecraft/class_9205;
    • method_56736

      public class_9202 method_56736()
      Mappings:
      Namespace Name Mixin selector
      official d Ldlm;d()Ldln;
      intermediary method_56736 Lnet/minecraft/class_9199;method_56736()Lnet/minecraft/class_9202;
      named method_56736 Lnet/minecraft/class_9199;method_56736()Lnet/minecraft/class_9202;
    • method_56737

      public class_9203 method_56737()
      Mappings:
      Namespace Name Mixin selector
      official f Ldlm;f()Ldlo;
      intermediary method_56737 Lnet/minecraft/class_9199;method_56737()Lnet/minecraft/class_9203;
      named method_56737 Lnet/minecraft/class_9199;method_56737()Lnet/minecraft/class_9203;
    • method_56730

      public void method_56730(class_9203 class_9203)
      Mappings:
      Namespace Name Mixin selector
      official a Ldlm;a(Ldlo;)V
      intermediary method_56730 Lnet/minecraft/class_9199;method_56730(Lnet/minecraft/class_9203;)V
      named method_56730 Lnet/minecraft/class_9199;method_56730(Lnet/minecraft/class_9203;)V