Class NbtComponent

java.lang.Object
net.minecraft.component.type.NbtComponent

public final class NbtComponent extends Object
Mappings:
Namespace Name
named net/minecraft/component/type/NbtComponent
intermediary net/minecraft/class_9279
official cxg
  • Field Details

    • field_51522

      private static final Logger field_51522
      Mappings:
      Namespace Name Mixin selector
      named field_51522 Lnet/minecraft/component/type/NbtComponent;field_51522:Lorg/slf4j/Logger;
      intermediary field_51522 Lnet/minecraft/class_9279;field_51522:Lorg/slf4j/Logger;
      official e Lcxg;e:Lorg/slf4j/Logger;
    • DEFAULT

      public static final NbtComponent DEFAULT
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT Lnet/minecraft/component/type/NbtComponent;DEFAULT:Lnet/minecraft/component/type/NbtComponent;
      intermediary field_49302 Lnet/minecraft/class_9279;field_49302:Lnet/minecraft/class_9279;
      official a Lcxg;a:Lcxg;
    • CODEC

      public static final com.mojang.serialization.Codec<NbtComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/NbtComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49303 Lnet/minecraft/class_9279;field_49303:Lcom/mojang/serialization/Codec;
      official b Lcxg;b:Lcom/mojang/serialization/Codec;
    • CODEC_WITH_ID

      public static final com.mojang.serialization.Codec<NbtComponent> CODEC_WITH_ID
      Mappings:
      Namespace Name Mixin selector
      named CODEC_WITH_ID Lnet/minecraft/component/type/NbtComponent;CODEC_WITH_ID:Lcom/mojang/serialization/Codec;
      intermediary field_49304 Lnet/minecraft/class_9279;field_49304:Lcom/mojang/serialization/Codec;
      official c Lcxg;c:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      @Deprecated public static final PacketCodec<ByteBuf,NbtComponent> PACKET_CODEC
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/NbtComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49305 Lnet/minecraft/class_9279;field_49305:Lnet/minecraft/class_9139;
      official d Lcxg;d:Lzn;
    • nbt

      private final NbtCompound nbt
      Mappings:
      Namespace Name Mixin selector
      named nbt Lnet/minecraft/component/type/NbtComponent;nbt:Lnet/minecraft/nbt/NbtCompound;
      intermediary field_49306 Lnet/minecraft/class_9279;field_49306:Lnet/minecraft/class_2487;
      official f Lcxg;f:Lus;
  • Constructor Details

    • NbtComponent

      private NbtComponent(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/component/type/NbtComponent;<init>(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary <init> Lnet/minecraft/class_9279;<init>(Lnet/minecraft/class_2487;)V
      official <init> Lcxg;<init>(Lus;)V
  • Method Details

    • of

      public static NbtComponent of(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/component/type/NbtComponent;of(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/component/type/NbtComponent;
      intermediary method_57456 Lnet/minecraft/class_9279;method_57456(Lnet/minecraft/class_2487;)Lnet/minecraft/class_9279;
      official a Lcxg;a(Lus;)Lcxg;
    • createPredicate

      public static Predicate<ItemStack> createPredicate(DataComponentType<NbtComponent> type, NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named createPredicate Lnet/minecraft/component/type/NbtComponent;createPredicate(Lnet/minecraft/component/DataComponentType;Lnet/minecraft/nbt/NbtCompound;)Ljava/util/function/Predicate;
      intermediary method_57454 Lnet/minecraft/class_9279;method_57454(Lnet/minecraft/class_9331;Lnet/minecraft/class_2487;)Ljava/util/function/Predicate;
      official a Lcxg;a(Lkl;Lus;)Ljava/util/function/Predicate;
    • matches

      public boolean matches(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named matches Lnet/minecraft/component/type/NbtComponent;matches(Lnet/minecraft/nbt/NbtCompound;)Z
      intermediary method_57460 Lnet/minecraft/class_9279;method_57460(Lnet/minecraft/class_2487;)Z
      official b Lcxg;b(Lus;)Z
    • set

      public static void set(DataComponentType<NbtComponent> type, ItemStack stack, Consumer<NbtCompound> nbtSetter)
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/component/type/NbtComponent;set(Lnet/minecraft/component/DataComponentType;Lnet/minecraft/item/ItemStack;Ljava/util/function/Consumer;)V
      intermediary method_57452 Lnet/minecraft/class_9279;method_57452(Lnet/minecraft/class_9331;Lnet/minecraft/class_1799;Ljava/util/function/Consumer;)V
      official a Lcxg;a(Lkl;Lcur;Ljava/util/function/Consumer;)V
    • set

      public static void set(DataComponentType<NbtComponent> type, ItemStack stack, NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/component/type/NbtComponent;set(Lnet/minecraft/component/DataComponentType;Lnet/minecraft/item/ItemStack;Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_57453 Lnet/minecraft/class_9279;method_57453(Lnet/minecraft/class_9331;Lnet/minecraft/class_1799;Lnet/minecraft/class_2487;)V
      official a Lcxg;a(Lkl;Lcur;Lus;)V
    • apply

      public NbtComponent apply(Consumer<NbtCompound> nbtConsumer)
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/component/type/NbtComponent;apply(Ljava/util/function/Consumer;)Lnet/minecraft/component/type/NbtComponent;
      intermediary method_57451 Lnet/minecraft/class_9279;method_57451(Ljava/util/function/Consumer;)Lnet/minecraft/class_9279;
      official a Lcxg;a(Ljava/util/function/Consumer;)Lcxg;
    • applyToEntity

      public void applyToEntity(Entity entity)
      Mappings:
      Namespace Name Mixin selector
      named applyToEntity Lnet/minecraft/component/type/NbtComponent;applyToEntity(Lnet/minecraft/entity/Entity;)V
      intermediary method_57445 Lnet/minecraft/class_9279;method_57445(Lnet/minecraft/class_1297;)V
      official a Lcxg;a(Lbsw;)V
    • applyToBlockEntity

      public boolean applyToBlockEntity(BlockEntity blockEntity, RegistryWrapper.WrapperLookup registryLookup)
      Mappings:
      Namespace Name Mixin selector
      named applyToBlockEntity Lnet/minecraft/component/type/NbtComponent;applyToBlockEntity(Lnet/minecraft/block/entity/BlockEntity;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Z
      intermediary method_57449 Lnet/minecraft/class_9279;method_57449(Lnet/minecraft/class_2586;Lnet/minecraft/class_7225$class_7874;)Z
      official a Lcxg;a(Ldpj;Ljk$a;)Z
    • with

      public <T> com.mojang.serialization.DataResult<NbtComponent> with(com.mojang.serialization.MapEncoder<T> encoder, T value)
      Mappings:
      Namespace Name Mixin selector
      named with Lnet/minecraft/component/type/NbtComponent;with(Lcom/mojang/serialization/MapEncoder;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary method_57447 Lnet/minecraft/class_9279;method_57447(Lcom/mojang/serialization/MapEncoder;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      official a Lcxg;a(Lcom/mojang/serialization/MapEncoder;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
    • get

      public <T> com.mojang.serialization.DataResult<T> get(com.mojang.serialization.MapDecoder<T> decoder)
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/component/type/NbtComponent;get(Lcom/mojang/serialization/MapDecoder;)Lcom/mojang/serialization/DataResult;
      intermediary method_57446 Lnet/minecraft/class_9279;method_57446(Lcom/mojang/serialization/MapDecoder;)Lcom/mojang/serialization/DataResult;
      official a Lcxg;a(Lcom/mojang/serialization/MapDecoder;)Lcom/mojang/serialization/DataResult;
    • getSize

      public int getSize()
      Mappings:
      Namespace Name Mixin selector
      named getSize Lnet/minecraft/component/type/NbtComponent;getSize()I
      intermediary method_57444 Lnet/minecraft/class_9279;method_57444()I
      official a Lcxg;a()I
    • isEmpty

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      named isEmpty Lnet/minecraft/component/type/NbtComponent;isEmpty()Z
      intermediary method_57458 Lnet/minecraft/class_9279;method_57458()Z
      official b Lcxg;b()Z
    • copyNbt

      public NbtCompound copyNbt()
      Mappings:
      Namespace Name Mixin selector
      named copyNbt Lnet/minecraft/component/type/NbtComponent;copyNbt()Lnet/minecraft/nbt/NbtCompound;
      intermediary method_57461 Lnet/minecraft/class_9279;method_57461()Lnet/minecraft/class_2487;
      official c Lcxg;c()Lus;
    • contains

      public boolean contains(String key)
      Mappings:
      Namespace Name Mixin selector
      named contains Lnet/minecraft/component/type/NbtComponent;contains(Ljava/lang/String;)Z
      intermediary method_57450 Lnet/minecraft/class_9279;method_57450(Ljava/lang/String;)Z
      official a Lcxg;a(Ljava/lang/String;)Z
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/component/type/NbtComponent;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_9279;equals(Ljava/lang/Object;)Z
      official equals Lcxg;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNbt

      @Deprecated public NbtCompound getNbt()
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named getNbt Lnet/minecraft/component/type/NbtComponent;getNbt()Lnet/minecraft/nbt/NbtCompound;
      intermediary method_57463 Lnet/minecraft/class_9279;method_57463()Lnet/minecraft/class_2487;
      official d Lcxg;d()Lus;