Class CompoundTag

java.lang.Object
net.minecraft.nbt.CompoundTag
All Implemented Interfaces:
Tag

public class CompoundTag
extends Object
implements Tag
Mappings:
Namespace Name
official mq
intermediary net/minecraft/class_2487
named net/minecraft/nbt/CompoundTag
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<CompoundTag> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a:Lcom/mojang/serialization/Codec;
      intermediary field_25128 Lnet/minecraft/class_2487;field_25128:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/nbt/CompoundTag;CODEC:Lcom/mojang/serialization/Codec;
    • READER

      public static final TagReader<CompoundTag> READER
      Mappings:
      Namespace Name Mixin selector
      official b Lmq;b:Lnk;
      intermediary field_21029 Lnet/minecraft/class_2487;field_21029:Lnet/minecraft/class_4614;
      named READER Lnet/minecraft/nbt/CompoundTag;READER:Lnet/minecraft/nbt/TagReader;
    • tags

      private final Map<String,​Tag> tags
      Mappings:
      Namespace Name Mixin selector
      official c Lmq;c:Ljava/util/Map;
      intermediary field_11515 Lnet/minecraft/class_2487;field_11515:Ljava/util/Map;
      named tags Lnet/minecraft/nbt/CompoundTag;tags:Ljava/util/Map;
  • Constructor Details

    • CompoundTag

      protected CompoundTag​(Map<String,​Tag> tags)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lmq;<init>(Ljava/util/Map;)V
      intermediary <init> Lnet/minecraft/class_2487;<init>(Ljava/util/Map;)V
      named <init> Lnet/minecraft/nbt/CompoundTag;<init>(Ljava/util/Map;)V
    • CompoundTag

      public CompoundTag()
  • Method Details

    • write

      public void write​(DataOutput output) throws IOException
      Specified by:
      write in interface Tag
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lni;a(Ljava/io/DataOutput;)V
      intermediary method_10713 Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)V
      named write Lnet/minecraft/nbt/Tag;write(Ljava/io/DataOutput;)V
    • getKeys

      public Set<String> getKeys()
      Mappings:
      Namespace Name Mixin selector
      official d Lmq;d()Ljava/util/Set;
      intermediary method_10541 Lnet/minecraft/class_2487;method_10541()Ljava/util/Set;
      named getKeys Lnet/minecraft/nbt/CompoundTag;getKeys()Ljava/util/Set;
    • getType

      public byte getType()
      Specified by:
      getType in interface Tag
      Mappings:
      Namespace Name Mixin selector
      official a Lni;a()B
      intermediary method_10711 Lnet/minecraft/class_2520;method_10711()B
      named getType Lnet/minecraft/nbt/Tag;getType()B
    • getReader

      public TagReader<CompoundTag> getReader()
      Specified by:
      getReader in interface Tag
      Mappings:
      Namespace Name Mixin selector
      official b Lni;b()Lnk;
      intermediary method_23258 Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;
      named getReader Lnet/minecraft/nbt/Tag;getReader()Lnet/minecraft/nbt/TagReader;
    • getSize

      public int getSize()
      Mappings:
      Namespace Name Mixin selector
      official e Lmq;e()I
      intermediary method_10546 Lnet/minecraft/class_2487;method_10546()I
      named getSize Lnet/minecraft/nbt/CompoundTag;getSize()I
    • put

      @Nullable public Tag put​(String key, Tag tag)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;Lni;)Lni;
      intermediary method_10566 Lnet/minecraft/class_2487;method_10566(Ljava/lang/String;Lnet/minecraft/class_2520;)Lnet/minecraft/class_2520;
      named put Lnet/minecraft/nbt/CompoundTag;put(Ljava/lang/String;Lnet/minecraft/nbt/Tag;)Lnet/minecraft/nbt/Tag;
    • putByte

      public void putByte​(String key, byte value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;B)V
      intermediary method_10567 Lnet/minecraft/class_2487;method_10567(Ljava/lang/String;B)V
      named putByte Lnet/minecraft/nbt/CompoundTag;putByte(Ljava/lang/String;B)V
    • putShort

      public void putShort​(String key, short value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;S)V
      intermediary method_10575 Lnet/minecraft/class_2487;method_10575(Ljava/lang/String;S)V
      named putShort Lnet/minecraft/nbt/CompoundTag;putShort(Ljava/lang/String;S)V
    • putInt

      public void putInt​(String key, int value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;I)V
      intermediary method_10569 Lnet/minecraft/class_2487;method_10569(Ljava/lang/String;I)V
      named putInt Lnet/minecraft/nbt/CompoundTag;putInt(Ljava/lang/String;I)V
    • putLong

      public void putLong​(String key, long value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;J)V
      intermediary method_10544 Lnet/minecraft/class_2487;method_10544(Ljava/lang/String;J)V
      named putLong Lnet/minecraft/nbt/CompoundTag;putLong(Ljava/lang/String;J)V
    • putUuid

      public void putUuid​(String key, UUID value)
      Writes a UUID to its NBT representation in this CompoundTag.
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;Ljava/util/UUID;)V
      intermediary method_25927 Lnet/minecraft/class_2487;method_25927(Ljava/lang/String;Ljava/util/UUID;)V
      named putUuid Lnet/minecraft/nbt/CompoundTag;putUuid(Ljava/lang/String;Ljava/util/UUID;)V
    • getUuid

      public UUID getUuid​(String key)
      Reads a UUID from its NBT representation in this CompoundTag.
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;)Ljava/util/UUID;
      intermediary method_25926 Lnet/minecraft/class_2487;method_25926(Ljava/lang/String;)Ljava/util/UUID;
      named getUuid Lnet/minecraft/nbt/CompoundTag;getUuid(Ljava/lang/String;)Ljava/util/UUID;
    • containsUuid

      public boolean containsUuid​(String key)
      Returns true if this CompoundTag contains a valid UUID representation associated with the given key. A valid UUID is represented by an int array of length 4.
      Mappings:
      Namespace Name Mixin selector
      official b Lmq;b(Ljava/lang/String;)Z
      intermediary method_25928 Lnet/minecraft/class_2487;method_25928(Ljava/lang/String;)Z
      named containsUuid Lnet/minecraft/nbt/CompoundTag;containsUuid(Ljava/lang/String;)Z
    • putFloat

      public void putFloat​(String key, float value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;F)V
      intermediary method_10548 Lnet/minecraft/class_2487;method_10548(Ljava/lang/String;F)V
      named putFloat Lnet/minecraft/nbt/CompoundTag;putFloat(Ljava/lang/String;F)V
    • putDouble

      public void putDouble​(String key, double value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;D)V
      intermediary method_10549 Lnet/minecraft/class_2487;method_10549(Ljava/lang/String;D)V
      named putDouble Lnet/minecraft/nbt/CompoundTag;putDouble(Ljava/lang/String;D)V
    • putString

      public void putString​(String key, String value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;Ljava/lang/String;)V
      intermediary method_10582 Lnet/minecraft/class_2487;method_10582(Ljava/lang/String;Ljava/lang/String;)V
      named putString Lnet/minecraft/nbt/CompoundTag;putString(Ljava/lang/String;Ljava/lang/String;)V
    • putByteArray

      public void putByteArray​(String key, byte[] value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;[B)V
      intermediary method_10570 Lnet/minecraft/class_2487;method_10570(Ljava/lang/String;[B)V
      named putByteArray Lnet/minecraft/nbt/CompoundTag;putByteArray(Ljava/lang/String;[B)V
    • putIntArray

      public void putIntArray​(String key, int[] value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;[I)V
      intermediary method_10539 Lnet/minecraft/class_2487;method_10539(Ljava/lang/String;[I)V
      named putIntArray Lnet/minecraft/nbt/CompoundTag;putIntArray(Ljava/lang/String;[I)V
    • putIntArray

      public void putIntArray​(String key, List<Integer> value)
      Mappings:
      Namespace Name Mixin selector
      official b Lmq;b(Ljava/lang/String;Ljava/util/List;)V
      intermediary method_10572 Lnet/minecraft/class_2487;method_10572(Ljava/lang/String;Ljava/util/List;)V
      named putIntArray Lnet/minecraft/nbt/CompoundTag;putIntArray(Ljava/lang/String;Ljava/util/List;)V
    • putLongArray

      public void putLongArray​(String key, long[] value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;[J)V
      intermediary method_10564 Lnet/minecraft/class_2487;method_10564(Ljava/lang/String;[J)V
      named putLongArray Lnet/minecraft/nbt/CompoundTag;putLongArray(Ljava/lang/String;[J)V
    • putLongArray

      public void putLongArray​(String key, List<Long> value)
      Mappings:
      Namespace Name Mixin selector
      official c Lmq;c(Ljava/lang/String;Ljava/util/List;)V
      intermediary method_10538 Lnet/minecraft/class_2487;method_10538(Ljava/lang/String;Ljava/util/List;)V
      named putLongArray Lnet/minecraft/nbt/CompoundTag;putLongArray(Ljava/lang/String;Ljava/util/List;)V
    • putBoolean

      public void putBoolean​(String key, boolean value)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;Z)V
      intermediary method_10556 Lnet/minecraft/class_2487;method_10556(Ljava/lang/String;Z)V
      named putBoolean Lnet/minecraft/nbt/CompoundTag;putBoolean(Ljava/lang/String;Z)V
    • get

      @Nullable public Tag get​(String key)
      Mappings:
      Namespace Name Mixin selector
      official c Lmq;c(Ljava/lang/String;)Lni;
      intermediary method_10580 Lnet/minecraft/class_2487;method_10580(Ljava/lang/String;)Lnet/minecraft/class_2520;
      named get Lnet/minecraft/nbt/CompoundTag;get(Ljava/lang/String;)Lnet/minecraft/nbt/Tag;
    • getType

      public byte getType​(String key)
      Mappings:
      Namespace Name Mixin selector
      official d Lmq;d(Ljava/lang/String;)B
      intermediary method_10540 Lnet/minecraft/class_2487;method_10540(Ljava/lang/String;)B
      named getType Lnet/minecraft/nbt/CompoundTag;getType(Ljava/lang/String;)B
    • contains

      public boolean contains​(String key)
      Mappings:
      Namespace Name Mixin selector
      official e Lmq;e(Ljava/lang/String;)Z
      intermediary method_10545 Lnet/minecraft/class_2487;method_10545(Ljava/lang/String;)Z
      named contains Lnet/minecraft/nbt/CompoundTag;contains(Ljava/lang/String;)Z
    • contains

      public boolean contains​(String key, int type)
      Mappings:
      Namespace Name Mixin selector
      official b Lmq;b(Ljava/lang/String;I)Z
      intermediary method_10573 Lnet/minecraft/class_2487;method_10573(Ljava/lang/String;I)Z
      named contains Lnet/minecraft/nbt/CompoundTag;contains(Ljava/lang/String;I)Z
    • getByte

      public byte getByte​(String key)
      Mappings:
      Namespace Name Mixin selector
      official f Lmq;f(Ljava/lang/String;)B
      intermediary method_10571 Lnet/minecraft/class_2487;method_10571(Ljava/lang/String;)B
      named getByte Lnet/minecraft/nbt/CompoundTag;getByte(Ljava/lang/String;)B
    • getShort

      public short getShort​(String key)
      Mappings:
      Namespace Name Mixin selector
      official g Lmq;g(Ljava/lang/String;)S
      intermediary method_10568 Lnet/minecraft/class_2487;method_10568(Ljava/lang/String;)S
      named getShort Lnet/minecraft/nbt/CompoundTag;getShort(Ljava/lang/String;)S
    • getInt

      public int getInt​(String key)
      Mappings:
      Namespace Name Mixin selector
      official h Lmq;h(Ljava/lang/String;)I
      intermediary method_10550 Lnet/minecraft/class_2487;method_10550(Ljava/lang/String;)I
      named getInt Lnet/minecraft/nbt/CompoundTag;getInt(Ljava/lang/String;)I
    • getLong

      public long getLong​(String key)
      Mappings:
      Namespace Name Mixin selector
      official i Lmq;i(Ljava/lang/String;)J
      intermediary method_10537 Lnet/minecraft/class_2487;method_10537(Ljava/lang/String;)J
      named getLong Lnet/minecraft/nbt/CompoundTag;getLong(Ljava/lang/String;)J
    • getFloat

      public float getFloat​(String key)
      Mappings:
      Namespace Name Mixin selector
      official j Lmq;j(Ljava/lang/String;)F
      intermediary method_10583 Lnet/minecraft/class_2487;method_10583(Ljava/lang/String;)F
      named getFloat Lnet/minecraft/nbt/CompoundTag;getFloat(Ljava/lang/String;)F
    • getDouble

      public double getDouble​(String key)
      Mappings:
      Namespace Name Mixin selector
      official k Lmq;k(Ljava/lang/String;)D
      intermediary method_10574 Lnet/minecraft/class_2487;method_10574(Ljava/lang/String;)D
      named getDouble Lnet/minecraft/nbt/CompoundTag;getDouble(Ljava/lang/String;)D
    • getString

      public String getString​(String key)
      Mappings:
      Namespace Name Mixin selector
      official l Lmq;l(Ljava/lang/String;)Ljava/lang/String;
      intermediary method_10558 Lnet/minecraft/class_2487;method_10558(Ljava/lang/String;)Ljava/lang/String;
      named getString Lnet/minecraft/nbt/CompoundTag;getString(Ljava/lang/String;)Ljava/lang/String;
    • getByteArray

      public byte[] getByteArray​(String key)
      Mappings:
      Namespace Name Mixin selector
      official m Lmq;m(Ljava/lang/String;)[B
      intermediary method_10547 Lnet/minecraft/class_2487;method_10547(Ljava/lang/String;)[B
      named getByteArray Lnet/minecraft/nbt/CompoundTag;getByteArray(Ljava/lang/String;)[B
    • getIntArray

      public int[] getIntArray​(String key)
      Mappings:
      Namespace Name Mixin selector
      official n Lmq;n(Ljava/lang/String;)[I
      intermediary method_10561 Lnet/minecraft/class_2487;method_10561(Ljava/lang/String;)[I
      named getIntArray Lnet/minecraft/nbt/CompoundTag;getIntArray(Ljava/lang/String;)[I
    • getLongArray

      public long[] getLongArray​(String key)
      Mappings:
      Namespace Name Mixin selector
      official o Lmq;o(Ljava/lang/String;)[J
      intermediary method_10565 Lnet/minecraft/class_2487;method_10565(Ljava/lang/String;)[J
      named getLongArray Lnet/minecraft/nbt/CompoundTag;getLongArray(Ljava/lang/String;)[J
    • getCompound

      public CompoundTag getCompound​(String key)
      Mappings:
      Namespace Name Mixin selector
      official p Lmq;p(Ljava/lang/String;)Lmq;
      intermediary method_10562 Lnet/minecraft/class_2487;method_10562(Ljava/lang/String;)Lnet/minecraft/class_2487;
      named getCompound Lnet/minecraft/nbt/CompoundTag;getCompound(Ljava/lang/String;)Lnet/minecraft/nbt/CompoundTag;
    • getList

      public ListTag getList​(String key, int type)
      Mappings:
      Namespace Name Mixin selector
      official c Lmq;c(Ljava/lang/String;I)Lmw;
      intermediary method_10554 Lnet/minecraft/class_2487;method_10554(Ljava/lang/String;I)Lnet/minecraft/class_2499;
      named getList Lnet/minecraft/nbt/CompoundTag;getList(Ljava/lang/String;I)Lnet/minecraft/nbt/ListTag;
    • getBoolean

      public boolean getBoolean​(String key)
      Mappings:
      Namespace Name Mixin selector
      official q Lmq;q(Ljava/lang/String;)Z
      intermediary method_10577 Lnet/minecraft/class_2487;method_10577(Ljava/lang/String;)Z
      named getBoolean Lnet/minecraft/nbt/CompoundTag;getBoolean(Ljava/lang/String;)Z
    • remove

      public void remove​(String key)
      Mappings:
      Namespace Name Mixin selector
      official r Lmq;r(Ljava/lang/String;)V
      intermediary method_10551 Lnet/minecraft/class_2487;method_10551(Ljava/lang/String;)V
      named remove Lnet/minecraft/nbt/CompoundTag;remove(Ljava/lang/String;)V
    • toString

      public String toString()
      Specified by:
      toString in interface Tag
      Overrides:
      toString in class Object
      Mappings:
      Namespace Name Mixin selector
      official toString Lni;toString()Ljava/lang/String;
      intermediary toString Lnet/minecraft/class_2520;toString()Ljava/lang/String;
      named toString Lnet/minecraft/nbt/Tag;toString()Ljava/lang/String;
    • isEmpty

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      official f Lmq;f()Z
      intermediary method_33133 Lnet/minecraft/class_2487;method_33133()Z
      named isEmpty Lnet/minecraft/nbt/CompoundTag;isEmpty()Z
    • createCrashReport

      private CrashReport createCrashReport​(String key, TagReader<?> tagReader, ClassCastException classCastException)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;Lnk;Ljava/lang/ClassCastException;)Ll;
      intermediary method_10559 Lnet/minecraft/class_2487;method_10559(Ljava/lang/String;Lnet/minecraft/class_4614;Ljava/lang/ClassCastException;)Lnet/minecraft/class_128;
      named createCrashReport Lnet/minecraft/nbt/CompoundTag;createCrashReport(Ljava/lang/String;Lnet/minecraft/nbt/TagReader;Ljava/lang/ClassCastException;)Lnet/minecraft/util/crash/CrashReport;
    • copy

      public CompoundTag copy()
      Specified by:
      copy in interface Tag
      Mappings:
      Namespace Name Mixin selector
      official g Lmq;g()Lmq;
      intermediary method_10553 Lnet/minecraft/class_2487;method_10553()Lnet/minecraft/class_2487;
      named copy Lnet/minecraft/nbt/CompoundTag;copy()Lnet/minecraft/nbt/CompoundTag;
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      official equals Lmq;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2487;equals(Ljava/lang/Object;)Z
      named equals Lnet/minecraft/nbt/CompoundTag;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Mappings:
      Namespace Name Mixin selector
      official hashCode Lmq;hashCode()I
      intermediary hashCode Lnet/minecraft/class_2487;hashCode()I
      named hashCode Lnet/minecraft/nbt/CompoundTag;hashCode()I
    • write

      private static void write​(String key, Tag tag, DataOutput output) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Ljava/lang/String;Lni;Ljava/io/DataOutput;)V
      intermediary method_10555 Lnet/minecraft/class_2487;method_10555(Ljava/lang/String;Lnet/minecraft/class_2520;Ljava/io/DataOutput;)V
      named write Lnet/minecraft/nbt/CompoundTag;write(Ljava/lang/String;Lnet/minecraft/nbt/Tag;Ljava/io/DataOutput;)V
    • readByte

      private static byte readByte​(DataInput input, PositionTracker tracker) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official c Lmq;c(Ljava/io/DataInput;Lmz;)B
      intermediary method_10542 Lnet/minecraft/class_2487;method_10542(Ljava/io/DataInput;Lnet/minecraft/class_2505;)B
      named readByte Lnet/minecraft/nbt/CompoundTag;readByte(Ljava/io/DataInput;Lnet/minecraft/nbt/PositionTracker;)B
    • readString

      private static String readString​(DataInput input, PositionTracker tracker) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official d Lmq;d(Ljava/io/DataInput;Lmz;)Ljava/lang/String;
      intermediary method_10552 Lnet/minecraft/class_2487;method_10552(Ljava/io/DataInput;Lnet/minecraft/class_2505;)Ljava/lang/String;
      named readString Lnet/minecraft/nbt/CompoundTag;readString(Ljava/io/DataInput;Lnet/minecraft/nbt/PositionTracker;)Ljava/lang/String;
    • read

      private static Tag read​(TagReader<?> reader, String key, DataInput input, int depth, PositionTracker tracker)
      Mappings:
      Namespace Name Mixin selector
      official b Lmq;b(Lnk;Ljava/lang/String;Ljava/io/DataInput;ILmz;)Lni;
      intermediary method_10581 Lnet/minecraft/class_2487;method_10581(Lnet/minecraft/class_4614;Ljava/lang/String;Ljava/io/DataInput;ILnet/minecraft/class_2505;)Lnet/minecraft/class_2520;
      named read Lnet/minecraft/nbt/CompoundTag;read(Lnet/minecraft/nbt/TagReader;Ljava/lang/String;Ljava/io/DataInput;ILnet/minecraft/nbt/PositionTracker;)Lnet/minecraft/nbt/Tag;
    • copyFrom

      public CompoundTag copyFrom​(CompoundTag source)
      Mappings:
      Namespace Name Mixin selector
      official a Lmq;a(Lmq;)Lmq;
      intermediary method_10543 Lnet/minecraft/class_2487;method_10543(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487;
      named copyFrom Lnet/minecraft/nbt/CompoundTag;copyFrom(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/nbt/CompoundTag;
    • accept

      public void accept​(NbtTagVisitor visitor)
      Specified by:
      accept in interface Tag
      Mappings:
      Namespace Name Mixin selector
      official a Lni;a(Lnm;)V
      intermediary method_32289 Lnet/minecraft/class_2520;method_32289(Lnet/minecraft/class_5627;)V
      named accept Lnet/minecraft/nbt/Tag;accept(Lnet/minecraft/nbt/visitor/NbtTagVisitor;)V
    • toMap

      protected Map<String,​Tag> toMap()
      Mappings:
      Namespace Name Mixin selector
      official h Lmq;h()Ljava/util/Map;
      intermediary method_29143 Lnet/minecraft/class_2487;method_29143()Ljava/util/Map;
      named toMap Lnet/minecraft/nbt/CompoundTag;toMap()Ljava/util/Map;