Tag

Base class for every NBT that contains id and encoding functions (the endianness may vary from a Minecraft version to another and the purpose of the tags in the game).

Members

Functions

decode
void decode(Stream )

Decodes the tag's body.

encode
void encode(Stream )

Encodes the tag's body.

name
string name()

Gets the tag's name, if there's one.

named
bool named()

Indicates whether the tag has a name.

rename
Tag rename(string )

Creates a NamedTag maintaing the tag's properties.

toJSON
JSONValue toJSON()

Encodes the tag's value as json.

toString
string toString()

Encodes the tag a human-readable string.

Properties

type
NBT_TYPE type [@property getter]

Gets the tag's type.

Variables

_name
string _name;
Undocumented in source.
_named
bool _named;
Undocumented in source.

Meta