sel.nbt.tags

Members

Aliases

Bool
alias Bool = Byte

Byte tag that only uses the values 1 and 0 to indicate respectively true and false. It's usually used by SEL to store boolean values instead of a byte tag.

Byte
alias Byte = SimpleTag!(byte, NBT_TYPE.BYTE)

Tag with a signed byte, usually used to store small values like the progress of an action or the type of an entity. An unsigned version of the tag can be obtained doing a cast to ubyte. <a href="#ByteArray">Byte Array</a> is a tag with an array of unsigned bytes.

ByteArray
alias ByteArray = NumericArrayTag!(byte, NBT_TYPE.BYTE_ARRAY)

Array of unsigned bytes (clients and other softwares may interpret the bytes as signed due to limitations of the programming language). The tag is usually used by Minecraft's worlds to store blocks' ids and metas.

Double
alias Double = SimpleTag!(double, NBT_TYPE.DOUBLE)

Tag with an 8-bytes float point value used instead of the Float tag if the precision or the available number's range must be higher. See <a href="#Float">Float</a>'s documentation for informations about the NaN value and its support inside and outside SEL.

Float
alias Float = SimpleTag!(float, NBT_TYPE.FLOAT)

Tag with a 4-bytes floating point value, usually used to store non-blocks coordinates or points in the world. The float.nan value can be used and recognized by the SEL-derived systems, but couldn't be recognized by other softwares based on different programming languages that doesn't support the not-a-number value. More informations about the NaN value and its encoding can be found on <a href="#https://en.wikipedia.org/wiki/NaN">Wikipedia</a>.

Int
alias Int = SimpleTag!(int, NBT_TYPE.INT)

Tag with a signed integer, used to store values that don't usually fit in the short tag, like entity's ids. This tag can aslo be converted to its unsigned version (uint) with a simple cast to it. <a href="#IntArray">Int Array</a> is a tag with an array of signed integers.

IntArray
alias IntArray = NumericArrayTag!(int, NBT_TYPE.INT_ARRAY)

Array of signed integers, introduced in the last version of the NBT format. Used by anvil worlds.

Long
alias Long = SimpleTag!(long, NBT_TYPE.LONG)

Tag with a signed long.

LongArray
alias LongArray = NumericArrayTag!(long, NBT_TYPE.LONG_ARRAY)

Array of signed longs, introduced in Minecraft: Java Edition 1.13 and not yet in the other versions of Minecraft.

Short
alias Short = SimpleTag!(short, NBT_TYPE.SHORT)

Tag with a signed short, used when the 255 bytes (or 127 if only the positive part is counted) is not enough. This tag can also be converted to its unsigned version doing a simple cast to ushort.

String
alias String = SimpleTag!(string, NBT_TYPE.STRING)

Tag with an UTF-8 string encoded as its length as short and its content casted to btyes.

Tags
alias Tags = TypeTuple!(null, Byte, Short, Int, Long, Float, Double, ByteArray, String, List, Compound, IntArray, LongArray)
Undocumented in source.

Classes

ArrayTag
class ArrayTag(T, NBT_TYPE _type)

Simple tag with array-related functions.

Compound
class Compound

Associative array of named tags (that can be of different types).

List
class List
Undocumented in source.
ListImpl
class ListImpl(T : Tag)
Undocumented in source.
ListOf
class ListOf(T : Tag)

Array of signed longs, introduced in Minecraft: Java Edition 1.13 and not yet in the other versions of Minecraft.

NumericArrayTag
class NumericArrayTag(T, NBT_TYPE _type)

Simple tag with array-related functions.

SimpleTag
class SimpleTag(T, NBT_TYPE _type)

Simple tag with a value of type T, if T is a primitive type or it can be written in the buffer.

Tag
class 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).

Enums

NBT_TYPE
enum NBT_TYPE

NBT's ids, as unsigned bytes, used by for client-server and generic io communication.

Interfaces

IList
interface IList
Undocumented in source.

Templates

Named
template Named(T : Tag)

Creates a named tag. The first argument of the constructor becomes a string (the name) and rest doesn't change.

Meta

License

MIT

Authors

Kripth