Package net.minecraft.nbt
Class CompoundTag
java.lang.Object
net.minecraft.nbt.CompoundTag
- All Implemented Interfaces:
Tag
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CompoundTag>private static final intprivate static final intstatic 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(StreamTagVisitor p_197442_) voidaccept(TagVisitor p_177857_) booleanbooleancopy()private CrashReportcreateReport(String p_128373_, TagType<?> p_128374_, ClassCastException p_128375_) entries()booleanbooleangetBoolean(String p_128472_) bytebyte[]getByteArray(String p_128464_) getCompound(String p_128470_) doublefloatbytegetId()intint[]getIntArray(String p_128466_) longlong[]getLongArray(String p_128468_) shortbytegetTagType(String p_128436_) getType()inthashCode()booleanbooleanisEmpty()merge(CompoundTag p_128392_) voidputBoolean(String p_128380_, boolean p_128381_) voidvoidputByteArray(String p_128383_, byte[] p_128384_) voidputByteArray(String p_177854_, List<Byte> p_177855_) voidvoidvoidvoidputIntArray(String p_128386_, int[] p_128387_) voidputIntArray(String p_128409_, List<Integer> p_128410_) voidvoidputLongArray(String p_128389_, long[] p_128390_) voidputLongArray(String p_128429_, List<Long> p_128430_) voidvoidvoid(package private) static TagreadNamedTagData(TagType<?> p_128414_, String p_128415_, DataInput p_128416_, NbtAccounter p_128418_) voidintsize()inttoString()voidwrite(DataOutput p_128341_) private static voidwriteNamedTag(String p_128369_, Tag p_128370_, DataOutput p_128371_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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
-
write
- Specified by:
writein interfaceTag- Throws:
IOException
-
sizeInBytes
public int sizeInBytes()- Specified by:
sizeInBytesin 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
-