Enum Constant and Description |
---|
TAG_BYTE
A signed 1 byte integral type.
|
TAG_BYTE_ARRAY
An array of bytes.
|
TAG_COMPOUND
A list of fully formed tags, including their IDs, names, and payloads.
|
TAG_DOUBLE
A signed 8 byte floating point type.
|
TAG_END
Used to mark the end of compound tags.
|
TAG_FLOAT
A signed 4 byte floating point type.
|
TAG_INT
A signed 4 byte integral type.
|
TAG_INT_ARRAY
An array of TAG_Int's payloads..
|
TAG_LIST
A list of tag payloads, without repeated tag IDs or any tag names.
|
TAG_LONG
A signed 8 byte integral type.
|
TAG_SHORT
A signed 2 byte integral type.
|
TAG_STRING
A UTF-8 string
|
Modifier and Type | Method and Description |
---|---|
int |
getRawID()
Retrieves the raw unique integer that identifies the type of the parent NBT element.
|
static NbtType |
getTypeFromClass(java.lang.Class<?> clazz)
Retrieve an NBT type from the given Java class.
|
static NbtType |
getTypeFromID(int rawID)
Retrieve an NBT type from a given raw ID.
|
java.lang.Class<?> |
getValueType()
Retrieves the type of the value stored in the NBT element.
|
boolean |
isComposite()
Determine if the given NBT can store multiple children NBT tags.
|
static NbtType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NbtType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NbtType TAG_END
public static final NbtType TAG_BYTE
public static final NbtType TAG_SHORT
public static final NbtType TAG_INT
public static final NbtType TAG_LONG
public static final NbtType TAG_FLOAT
public static final NbtType TAG_DOUBLE
public static final NbtType TAG_BYTE_ARRAY
public static final NbtType TAG_INT_ARRAY
public static final NbtType TAG_STRING
public static final NbtType TAG_LIST
public static final NbtType TAG_COMPOUND
public static NbtType[] values()
for (NbtType c : NbtType.values()) System.out.println(c);
public static NbtType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isComposite()
public int getRawID()
public java.lang.Class<?> getValueType()
public static NbtType getTypeFromID(int rawID)
rawID
- - the raw ID to lookup.public static NbtType getTypeFromClass(java.lang.Class<?> clazz)
clazz
- - type of the value the NBT type can contain.java.lang.IllegalArgumentException
- If this class type cannot be represented by NBT tags.