类 CompoundTag
java.lang.Object
net.minecraft.nbt.CompoundTag
- 所有已实现的接口:
Tag
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.Codec
<CompoundTag> private static final org.slf4j.Logger
private static final int
private static final int
static final TagType
<CompoundTag> 从接口继承的字段 net.minecraft.nbt.Tag
ARRAY_HEADER, MAX_DEPTH, OBJECT_HEADER, OBJECT_REFERENCE, STRING_SIZE, 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
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明accept
(StreamTagVisitor p_197442_) void
accept
(TagVisitor p_177857_) boolean
copy()
entrySet()
boolean
void
forEach
(BiConsumer<String, Tag> p_409767_) getBoolean
(String p_128472_) boolean
getBooleanOr
(String p_409730_, boolean p_410716_) Optional
<byte[]> getByteArray
(String p_128464_) byte
getCompound
(String p_128470_) getCompoundOrEmpty
(String p_410263_) double
getDoubleOr
(String p_410157_, double p_410495_) float
getFloatOr
(String p_410440_, float p_410371_) byte
getId()
Optional
<int[]> getIntArray
(String p_128466_) int
getListOrEmpty
(String p_409758_) Optional
<long[]> getLongArray
(String p_128468_) long
getOptional
(String p_409622_) short
getShortOr
(String p_409927_, short p_410172_) getStringOr
(String p_410368_, String p_410785_) getType()
int
hashCode()
boolean
isEmpty()
keySet()
merge
(CompoundTag p_128392_) void
putBoolean
(String p_128380_, boolean p_128381_) void
void
putByteArray
(String p_128383_, byte[] p_128384_) void
void
void
void
putIntArray
(String p_128386_, int[] p_128387_) void
void
putLongArray
(String p_128389_, long[] p_128390_) void
void
<T> Optional
<T> read
(com.mojang.serialization.MapCodec<T> p_401035_) <T> Optional
<T> read
(com.mojang.serialization.MapCodec<T> p_401418_, com.mojang.serialization.DynamicOps<Tag> p_401213_) <T> Optional
<T> <T> Optional
<T> read
(String p_401362_, com.mojang.serialization.Codec<T> p_401434_, com.mojang.serialization.DynamicOps<Tag> p_401431_) (专用程序包) static Tag
readNamedTagData
(TagType<?> p_128414_, String p_128415_, DataInput p_128416_, NbtAccounter p_128418_) void
protected CompoundTag
int
size()
int
<T> void
store
(com.mojang.serialization.MapCodec<T> p_401165_, com.mojang.serialization.DynamicOps<Tag> p_401224_, T p_401226_) <T> void
store
(com.mojang.serialization.MapCodec<T> p_401258_, T p_401416_) <T> void
store
(String p_401002_, com.mojang.serialization.Codec<T> p_401379_, com.mojang.serialization.DynamicOps<Tag> p_401063_, T p_401119_) <T> void
<T> void
storeNullable
(String p_404778_, com.mojang.serialization.Codec<T> p_405437_, com.mojang.serialization.DynamicOps<Tag> p_405108_, T p_405353_) <T> void
storeNullable
(String p_405110_, com.mojang.serialization.Codec<T> p_405799_, T p_405604_) toString()
values()
void
write
(DataOutput p_128341_) private static void
writeNamedTag
(String p_128369_, Tag p_128370_, DataOutput p_128371_) 从接口继承的方法 net.minecraft.nbt.Tag
acceptAsRoot, asBoolean, asByte, asByteArray, asDouble, asFloat, asInt, asIntArray, asList, asLong, asLongArray, asNumber, asShort, asString
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CODEC
-
SELF_SIZE_IN_BYTES
private static final int SELF_SIZE_IN_BYTES- 另请参阅:
-
MAP_ENTRY_SIZE_IN_BYTES
private static final int MAP_ENTRY_SIZE_IN_BYTES- 另请参阅:
-
TYPE
-
tags
-
-
构造器详细资料
-
CompoundTag
-
CompoundTag
public CompoundTag()
-
-
方法详细资料
-
write
- 指定者:
write
在接口中Tag
- 抛出:
IOException
-
sizeInBytes
public int sizeInBytes()- 指定者:
sizeInBytes
在接口中Tag
-
keySet
-
entrySet
-
values
-
forEach
-
getId
public byte getId() -
getType
-
size
public int size() -
put
-
putByte
-
putShort
-
putInt
-
putLong
-
putFloat
-
putDouble
-
putString
-
putByteArray
-
putIntArray
-
putLongArray
-
putBoolean
-
get
-
contains
-
getOptional
-
getByte
-
getByteOr
-
getShort
-
getShortOr
-
getInt
-
getIntOr
-
getLong
-
getLongOr
-
getFloat
-
getFloatOr
-
getDouble
-
getDoubleOr
-
getString
-
getStringOr
-
getByteArray
-
getIntArray
-
getLongArray
-
getCompound
-
getCompoundOrEmpty
-
getList
-
getListOrEmpty
-
getBoolean
-
getBooleanOr
-
remove
-
toString
-
isEmpty
public boolean isEmpty() -
shallowCopy
-
copy
-
asCompound
- 指定者:
asCompound
在接口中Tag
-
equals
-
hashCode
public int hashCode() -
writeNamedTag
private static void writeNamedTag(String p_128369_, Tag p_128370_, DataOutput p_128371_) throws IOException - 抛出:
IOException
-
readNamedTagData
static Tag readNamedTagData(TagType<?> p_128414_, String p_128415_, DataInput p_128416_, NbtAccounter p_128418_) -
merge
-
accept
-
accept
-
store
-
storeNullable
public <T> void storeNullable(String p_405110_, com.mojang.serialization.Codec<T> p_405799_, @Nullable T p_405604_) -
store
-
storeNullable
-
store
public <T> void store(com.mojang.serialization.MapCodec<T> p_401258_, T p_401416_) -
store
public <T> void store(com.mojang.serialization.MapCodec<T> p_401165_, com.mojang.serialization.DynamicOps<Tag> p_401224_, T p_401226_) -
read
-
read
-
read
-
read
-