#[repr(u8)]pub enum TagIdent {
Show 13 variants
TAG_End = 0,
TAG_Byte = 1,
TAG_Short = 2,
TAG_Int = 3,
TAG_Long = 4,
TAG_Float = 5,
TAG_Double = 6,
TAG_Byte_Array = 7,
TAG_String = 8,
TAG_List = 9,
TAG_Compound = 10,
TAG_Int_Array = 11,
TAG_Long_Array = 12,
}Expand description
The numerical representation of Tag types.
Used within the internal encode/decode process and hence is returned within errors.
Variants§
TAG_End = 0
§TAG_End (0)
Signifies the end of a TAG_Compound. It is only ever used inside a TAG_Compound, and is not named despite being in a TAG_Compound
TAG_Byte = 1
§TAG_Byte (1)
A single signed byte
TAG_Short = 2
§TAG_Short (2)
A single signed, big endian 16 bit integer
TAG_Int = 3
§TAG_Int (3)
A single signed, big endian 32 bit integer
TAG_Long = 4
§TAG_Long (4)
A single signed, big endian 64 bit integer
TAG_Float = 5
§TAG_Float (5)
A single, big endian IEEE-754 single-precision floating point number (NaN possible)
TAG_Double = 6
§TAG_Double (6)
A single, big endian IEEE-754 double-precision floating point number (NaN possible)
TAG_Byte_Array = 7
§TAG_Byte_Array (7)
A length-prefixed array of signed bytes. The prefix is a signed integer (thus 4 bytes)
TAG_String = 8
§TAG_String (8)
A length-prefixed modified UTF-8 string. The prefix is an unsigned short (thus 2 bytes) signifying the length of the string in bytes
TAG_List = 9
§TAG_List (9)
A list of nameless tags, all of the same type. The list is prefixed with the Type ID of the items it contains (thus 1 byte), and the length of the list as a signed integer (a further 4 bytes). If the length of the list is 0 or negative, the type may be 0 (TAG_End) but otherwise it must be any other type. (The notchian implementation uses TAG_End in that situation, but another reference implementation by Mojang uses 1 instead; parsers should accept any type if the length is <= 0).
TAG_Compound = 10
§TAG_Compound (10)
Effectively a list of a named tags. Order is not guaranteed.
TAG_Int_Array = 11
§TAG_Int_Array (11)
A length-prefixed array of signed integers. The prefix is a signed integer (thus 4 bytes) and indicates the number of 4 byte integers.
TAG_Long_Array = 12
§TAG_Long_Array (12)
A length-prefixed array of signed longs. The prefix is a signed integer (thus 4 bytes) and indicates the number of 8 byte longs.