TagType

public enum TagType

The data-types that make up the NBT format.

Author

Nullicorn

Entries

Link copied to clipboard
END

Used to indicate the end of a COMPOUND tag. Also used as a placeholder type for empty LISTs. End tags are never used as a value, so their runtime type is null.

Link copied to clipboard
BYTE

A signed octet. Represented in-memory using the boxed Byte class.

Link copied to clipboard
SHORT

A signed 16-bit integer. Represented in-memory using the boxed Short class.

Link copied to clipboard
INT

A signed 32-bit integer. Represented in-memory using the boxed Integer class.

Link copied to clipboard
LONG

A signed 64-bit integer. Represented in-memory using the boxed Long class.

Link copied to clipboard
FLOAT

A 32-bit floating point number. Represented in-memory using the boxed Float class.

Link copied to clipboard
DOUBLE

A 64-bit floating point number. Represented in-memory using the boxed Double class.

Link copied to clipboard
BYTE_ARRAY

A length-prefixed array of signed octets. Represented in-memory using byte[].

Link copied to clipboard
STRING

A length-prefixed string of text. Strings are encoded using modified UTF-8 . They are represented in-memory using Java's String class.

Link copied to clipboard
LIST

A length-prefixed array of unnamed NBT tags with the same type. Represented in-memory using the NBTList class.

Link copied to clipboard
COMPOUND

A map-like structure for storing zero or more NBT tags, each associated with a unique string name. Unlike LISTs, tags inside a compound may have different types from one another. When encoded, the end of the compound is denoted by an unnamed tag whose type is END. Compounds are represented in-memory using the NBTCompound class.

Link copied to clipboard
INT_ARRAY

A length-prefixed array of signed 32-bit integers. Represented in-memory using int[].

Link copied to clipboard
LONG_ARRAY

A length-prefixed array of signed 64-bit integers. Represented in-memory using long[].

Functions

Link copied to clipboard
public static TagType fromId(int id)
Searches for a TagType that uses the provided ID.
Link copied to clipboard
public static TagType fromObject(Object obj)
Determines the TagType to use when storing the obj in a LIST or COMPOUND.
Link copied to clipboard
public Class<? extends Object> getClazz()
Link copied to clipboard
public int getId()
Link copied to clipboard
public Class<? extends Object> getRuntimeType()
Link copied to clipboard
public static TagType valueOf(String name)
Link copied to clipboard
public static Array<TagType> values()

Properties

Link copied to clipboard
public final int id
Link copied to clipboard
public final Class<? extends Object> runtimeType