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 cxf
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/component/type/NbtComponent;LOGGER:Lorg/slf4j/Logger;
      intermediary field_51522 Lnet/minecraft/class_9279;field_51522:Lorg/slf4j/Logger;
      official e Lcxf;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 Lcxf;a:Lcxf;
    • 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 Lcxf;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 Lcxf;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 Lcxf;d:Lyw;
    • 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 Lcxf;f:Lua;
  • 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> Lcxf;<init>(Lua;)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 Lcxf;a(Lua;)Lcxf;
    • createPredicate

      public static Predicate<ItemStack> createPredicate(ComponentType<NbtComponent> type, NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named createPredicate Lnet/minecraft/component/type/NbtComponent;createPredicate(Lnet/minecraft/component/ComponentType;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 Lcxf;a(Lkp;Lua;)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 Lcxf;b(Lua;)Z
    • set

      public static void set(ComponentType<NbtComponent> type, ItemStack stack, Consumer<NbtCompound> nbtSetter)
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/component/type/NbtComponent;set(Lnet/minecraft/component/ComponentType;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 Lcxf;a(Lkp;Lcuo;Ljava/util/function/Consumer;)V
    • set

      public static void set(ComponentType<NbtComponent> type, ItemStack stack, NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/component/type/NbtComponent;set(Lnet/minecraft/component/ComponentType;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 Lcxf;a(Lkp;Lcuo;Lua;)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 Lcxf;a(Ljava/util/function/Consumer;)Lcxf;
    • 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 Lcxf;a(Lbsq;)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 Lcxf;a(Ldqf;Ljo$a;)Z
    • with

      public <T> com.mojang.serialization.DataResult<NbtComponent> with(com.mojang.serialization.DynamicOps<NbtElement> ops, com.mojang.serialization.MapEncoder<T> encoder, T value)
      Mappings:
      Namespace Name Mixin selector
      named with Lnet/minecraft/component/type/NbtComponent;with(Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/MapEncoder;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary method_57447 Lnet/minecraft/class_9279;method_57447(Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/MapEncoder;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      official a Lcxf;a(Lcom/mojang/serialization/DynamicOps;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 Lcxf;a(Lcom/mojang/serialization/MapDecoder;)Lcom/mojang/serialization/DataResult;
    • get

      public <T> com.mojang.serialization.DataResult<T> get(com.mojang.serialization.DynamicOps<NbtElement> ops, com.mojang.serialization.MapDecoder<T> decoder)
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/component/type/NbtComponent;get(Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/MapDecoder;)Lcom/mojang/serialization/DataResult;
      intermediary method_59980 Lnet/minecraft/class_9279;method_59980(Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/MapDecoder;)Lcom/mojang/serialization/DataResult;
      official a Lcxf;a(Lcom/mojang/serialization/DynamicOps;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 Lcxf;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 Lcxf;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 Lcxf;c()Lua;
    • 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 Lcxf;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 Lcxf;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 Lcxf;d()Lua;