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

NbtByte

[jvm]
fun NbtByte(value: Boolean)

Wraps a byte 1 if the value is true and 0 otherwise.

Parameters

jvm

   
value The value to be checked

[jvm]
fun NbtByte(unsigned: Int)

Converts the int value to an unsigned byte and wraps it.

Parameters

jvm

   
unsigned Unsigned value from 0 to 255.

Throws

   
kotlin.NumberFormatException if the number is not within the 0..255 range

[jvm]
fun NbtByte(signed: String)

Parses the string value as a signed byte and wraps it.

Parameters

jvm

   
signed Signed value from -128 to 127.

Throws

   
kotlin.NumberFormatException if the number is not within a valid range or if the string does not contain a valid number.

[jvm]
fun NbtByte(signed: Byte)