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/NbtFile

NbtFile

[jvm]
data class NbtFile@JvmOverloadsconstructor(name: String, tag: NbtTag, version: Int?, length: Int?, isCompressed: Boolean?, isLittleEndian: Boolean?)

The root component of a file, it contains a hint for the file name and the first tag in the file.

Constructors

   
NbtFile [jvm]
@JvmOverloads
fun NbtFile(name: String, tag: NbtTag, version: Int? = null, length: Int? = null, isCompressed: Boolean? = null, isLittleEndian: Boolean? = null)

Properties

Name Summary
compound [jvm]
var compound: NbtCompound
A shortcut to read or write NbtFile.tag as a NbtCompound.
isCompressed [jvm]
var isCompressed: Boolean? = null
If the file needed to be uncompressed to load.
isLittleEndian [jvm]
var isLittleEndian: Boolean? = null
If the file’s byte order is little endian instead of big endian. Will throw a ClassCastException if the tag value is not a NbtCompound
length [jvm]
var length: Int? = null
The length of the file which is cached in the file’s header.
name [jvm]
var name: String
The key for the file name. Empty in most cases.
tag [jvm]
var tag: NbtTag
The first tag in the file. A NbtCompound in most cases.
version [jvm]
var version: Int? = null
The version of the data stored in this file.