INBTItem

Interface for all NBT TAGs containing convertion functions and virtual functions for type, size, name, value, encoding, decoding and reading from a stream.

Members

Functions

asByte
NBTByte asByte()
Undocumented in source. Be warned that the author may not have intended to support it.
asByteArray
NBTByteArray asByteArray()
Undocumented in source. Be warned that the author may not have intended to support it.
asCompound
NBTCompound asCompound()
Undocumented in source. Be warned that the author may not have intended to support it.
asDouble
NBTDouble asDouble()
Undocumented in source. Be warned that the author may not have intended to support it.
asFloat
NBTFloat asFloat()
Undocumented in source. Be warned that the author may not have intended to support it.
asInt
NBTInt asInt()
Undocumented in source. Be warned that the author may not have intended to support it.
asIntArray
NBTIntArray asIntArray()
Undocumented in source. Be warned that the author may not have intended to support it.
asList
NBTList asList()
Undocumented in source. Be warned that the author may not have intended to support it.
asLong
NBTLong asLong()
Undocumented in source. Be warned that the author may not have intended to support it.
asShort
NBTShort asShort()
Undocumented in source. Be warned that the author may not have intended to support it.
asString
NBTString asString()
Undocumented in source. Be warned that the author may not have intended to support it.
decode
void decode(ubyte[] data, bool compressed, bool hasName)

Decodes the item from a ubyte[] that can be compressed and/or read without name and TAG ID and stores the results in this.

encode
ubyte[] encode(bool compressed, bool hasName)

Encodes the item to a ubyte[] that can be compressed and/or written without name and TAG ID.

read
void read(ubyte[] stream, bool hasName)

Decodes the item from a ubyte[] stream that can be read without name and TAG ID and stores the results in this and advances the stream.

Properties

dup
INBTItem dup [@property getter]

Duplicates the Item.

name
string name [@property getter]
name
string name [@property setter]

Sets the name of the Item as UTF-8 string.

size
int size [@property getter]
type
NBTType type [@property getter]
value
T value [@property getter]
value
T value [@property setter]

Sets the current value and possible checks the input in the child classes.

Meta