Class NamedCompoundTagType
java.lang.Object
com.viaversion.viaversion.api.type.Type<com.viaversion.nbt.tag.CompoundTag>
com.viaversion.viaversion.api.type.types.misc.NamedCompoundTagType
- All Implemented Interfaces:
ByteBufReader<com.viaversion.nbt.tag.CompoundTag>,ByteBufWriter<com.viaversion.nbt.tag.CompoundTag>,CodecWriter<com.viaversion.nbt.tag.CompoundTag>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.viaversion.nbt.tag.CompoundTagread(io.netty.buffer.ByteBuf buffer) Reads a value from a ByteBuf.static com.viaversion.nbt.tag.CompoundTagread(io.netty.buffer.ByteBuf buffer, boolean readName) voidwrite(io.netty.buffer.ByteBuf buffer, com.viaversion.nbt.tag.CompoundTag object) Writes an object to a type to a ByteBuf.static voidMethods inherited from class com.viaversion.viaversion.api.type.Type
getBaseClass, getOutputClass, getTypeName, toString, write
-
Field Details
-
MAX_NBT_BYTES
public static final int MAX_NBT_BYTES- See Also:
-
MAX_NESTING_LEVEL
public static final int MAX_NESTING_LEVEL- See Also:
-
-
Constructor Details
-
NamedCompoundTagType
public NamedCompoundTagType()
-
-
Method Details
-
read
public com.viaversion.nbt.tag.CompoundTag read(io.netty.buffer.ByteBuf buffer) Description copied from interface:ByteBufReaderReads a value from a ByteBuf.- Parameters:
buffer- buffer to read from- Returns:
- type based on the class type
-
write
public void write(io.netty.buffer.ByteBuf buffer, com.viaversion.nbt.tag.CompoundTag object) Description copied from interface:ByteBufWriterWrites an object to a type to a ByteBuf.- Parameters:
buffer- buffer to write toobject- value to write
-
read
public static com.viaversion.nbt.tag.CompoundTag read(io.netty.buffer.ByteBuf buffer, boolean readName) throws IOException - Throws:
IOException
-
write
public static void write(io.netty.buffer.ByteBuf buffer, com.viaversion.nbt.tag.Tag tag, @Nullable String name) throws IOException - Throws:
IOException
-