Package net.minecraft.nbt
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 Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<CompoundTag>
CODEC
static TagReader<CompoundTag>
READER
private Map<String,Tag>
tags
-
Constructor Summary
Constructors Modifier Constructor Description CompoundTag()
protected
CompoundTag(Map<String,Tag> tags)
-
Method Summary
Modifier and Type Method Description void
accept(NbtTagVisitor visitor)
boolean
contains(String key)
boolean
contains(String key, int type)
boolean
containsUuid(String key)
Returnstrue
if thisCompoundTag
contains a valid UUID representation associated with the given key.CompoundTag
copy()
CompoundTag
copyFrom(CompoundTag source)
private CrashReport
createCrashReport(String key, TagReader<?> tagReader, ClassCastException classCastException)
boolean
equals(Object o)
Tag
get(String key)
boolean
getBoolean(String key)
byte
getByte(String key)
byte[]
getByteArray(String key)
CompoundTag
getCompound(String key)
double
getDouble(String key)
float
getFloat(String key)
int
getInt(String key)
int[]
getIntArray(String key)
Set<String>
getKeys()
ListTag
getList(String key, int type)
long
getLong(String key)
long[]
getLongArray(String key)
TagReader<CompoundTag>
getReader()
short
getShort(String key)
int
getSize()
String
getString(String key)
byte
getType()
byte
getType(String key)
UUID
getUuid(String key)
Reads aUUID
from its NBT representation in thisCompoundTag
.int
hashCode()
boolean
isEmpty()
Tag
put(String key, Tag tag)
void
putBoolean(String key, boolean value)
void
putByte(String key, byte value)
void
putByteArray(String key, byte[] value)
void
putDouble(String key, double value)
void
putFloat(String key, float value)
void
putInt(String key, int value)
void
putIntArray(String key, int[] value)
void
putIntArray(String key, List<Integer> value)
void
putLong(String key, long value)
void
putLongArray(String key, long[] value)
void
putLongArray(String key, List<Long> value)
void
putShort(String key, short value)
void
putString(String key, String value)
void
putUuid(String key, UUID value)
Writes aUUID
to its NBT representation in thisCompoundTag
.private static Tag
read(TagReader<?> reader, String key, DataInput input, int depth, PositionTracker tracker)
private static byte
readByte(DataInput input, PositionTracker tracker)
private static String
readString(DataInput input, PositionTracker tracker)
void
remove(String key)
protected Map<String,Tag>
toMap()
String
toString()
void
write(DataOutput output)
private static void
write(String key, Tag tag, DataOutput output)
-
Field Details
-
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
- 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
- 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
- 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
- Specified by:
write
in interfaceTag
- 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
- 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() -
getReader
-
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
- 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
- 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
- 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
- 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
- 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
Writes aUUID
to its NBT representation in thisCompoundTag
.- 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
Reads aUUID
from its NBT representation in thisCompoundTag
.- 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
Returnstrue
if thisCompoundTag
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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Specified by:
toString
in interfaceTag
- Overrides:
toString
in classObject
- 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
-
equals
-
hashCode
public int hashCode() -
write
- 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
- 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
- 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
- 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
-
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;
-