Package net.minecraft.nbt
Class CompoundTag
java.lang.Object
net.minecraft.nbt.CompoundTag
- All Implemented Interfaces:
Tag
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CompoundTag>
private static final int
private static final int
static final TagType<CompoundTag>
Fields inherited from interface net.minecraft.nbt.Tag
ARRAY_HEADER, MAX_DEPTH, OBJECT_HEADER, OBJECT_REFERENCE, STRING_SIZE, TAG_ANY_NUMERIC, TAG_BYTE, TAG_BYTE_ARRAY, TAG_COMPOUND, TAG_DOUBLE, TAG_END, TAG_FLOAT, TAG_INT, TAG_INT_ARRAY, TAG_LIST, TAG_LONG, TAG_LONG_ARRAY, TAG_SHORT, TAG_STRING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccept
(StreamTagVisitor p_197442_) void
accept
(TagVisitor p_177857_) static INBTBuilder.Builder
builder()
boolean
boolean
copy()
private CrashReport
createReport
(String p_128373_, TagType<?> p_128374_, ClassCastException p_128375_) entries()
boolean
boolean
getBoolean
(String p_128472_) byte
byte[]
getByteArray
(String p_128464_) getCompound
(String p_128470_) double
float
byte
getId()
int
int[]
getIntArray
(String p_128466_) long
long[]
getLongArray
(String p_128468_) short
byte
getTagType
(String p_128436_) getType()
int
hashCode()
boolean
boolean
isEmpty()
merge
(CompoundTag p_128392_) void
putBoolean
(String p_128380_, boolean p_128381_) void
void
putByteArray
(String p_128383_, byte[] p_128384_) void
putByteArray
(String p_177854_, List<Byte> p_177855_) void
void
void
void
putIntArray
(String p_128386_, int[] p_128387_) void
putIntArray
(String p_128409_, List<Integer> p_128410_) void
void
putLongArray
(String p_128389_, long[] p_128390_) void
putLongArray
(String p_128429_, List<Long> p_128430_) void
void
void
(package private) static Tag
readNamedTagData
(TagType<?> p_128414_, String p_128415_, DataInput p_128416_, NbtAccounter p_128418_) void
int
size()
int
toString()
void
write
(DataOutput p_128341_) private static void
writeNamedTag
(String p_128369_, Tag p_128370_, DataOutput p_128371_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.nbt.Tag
acceptAsRoot, getAsString
-
Field Details
-
CODEC
-
SELF_SIZE_IN_BYTES
private static final int SELF_SIZE_IN_BYTES- See Also:
-
MAP_ENTRY_SIZE_IN_BYTES
private static final int MAP_ENTRY_SIZE_IN_BYTES- See Also:
-
TYPE
-
tags
-
-
Constructor Details
-
CompoundTag
-
CompoundTag
public CompoundTag()
-
-
Method Details
-
builder
-
write
- Specified by:
write
in interfaceTag
- Throws:
IOException
-
sizeInBytes
public int sizeInBytes()- Specified by:
sizeInBytes
in interfaceTag
-
getAllKeys
-
getId
public byte getId() -
getType
-
size
public int size() -
put
-
putByte
-
putShort
-
putInt
-
putLong
-
putUUID
-
getUUID
-
hasUUID
-
putFloat
-
putDouble
-
putString
-
putByteArray
-
putByteArray
-
putIntArray
-
putIntArray
-
putLongArray
-
putLongArray
-
putBoolean
-
get
-
getTagType
-
contains
-
contains
-
getByte
-
getShort
-
getInt
-
getLong
-
getFloat
-
getDouble
-
getString
-
getByteArray
-
getIntArray
-
getLongArray
-
getCompound
-
getList
-
getBoolean
-
remove
-
toString
-
isEmpty
public boolean isEmpty() -
createReport
private CrashReport createReport(String p_128373_, TagType<?> p_128374_, ClassCastException p_128375_) -
copy
-
equals
-
hashCode
public int hashCode() -
writeNamedTag
private static void writeNamedTag(String p_128369_, Tag p_128370_, DataOutput p_128371_) throws IOException - Throws:
IOException
-
readNamedTagData
static Tag readNamedTagData(TagType<?> p_128414_, String p_128415_, DataInput p_128416_, NbtAccounter p_128418_) -
merge
-
accept
-
entries
-
accept
-