NBT-Manipulator

A kotlin/java lib that allows you to read and write NBT data in a clean way

View on GitHub

//nbt-manipulator/br.com.gamemods.nbtmanipulator/NbtIO/readNbtTagDirectly

readNbtTagDirectly

[jvm]\

@JvmStatic

fun <T : NbtTag> readNbtTagDirectly(input: DataInput, tagType: Class<T>? = null): T

Reads a NbtTag of type T from the input directly, this is a reader for writeNbtTagDirectly.

Parameters

jvm

   
input Where the file will be read, needs to handle compression and endianness.
tagType The type of the tag that will be read, use null if the tag was written with writeTypeId enabled

Throws

   
kotlin.IllegalArgumentException If T is exactly NbtTag.

[jvm]\

@JvmStatic

inline fun <T : NbtTag> readNbtTagDirectly(input: DataInput): T

Reads a NbtTag of type T from the input directly, this is a reader for writeNbtTagDirectly.

Parameters

jvm

   
input Where the file will be read, needs to handle compression and endianness.
T The type of the tag that will be read.

Throws

   
kotlin.IllegalArgumentException If T is exactly NbtTag.