public final class NBTType<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static NBTType<java.lang.Byte> |
BYTE |
static NBTType<byte[]> |
BYTE_ARRAY |
static NBTType<NBTCompoundTag> |
COMPOUND |
static NBTType<java.lang.Double> |
DOUBLE |
static NBTType<java.lang.Float> |
FLOAT |
int |
ID |
static NBTType<java.lang.Integer> |
INT |
static NBTType<int[]> |
INT_ARRAY |
static NBTType<NBTListTag> |
LIST |
static NBTType<java.lang.Long> |
LONG |
static NBTType<java.lang.Short> |
SHORT |
static NBTType<java.lang.String> |
STRING |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getName(int type) |
static NBTType |
getType(int type)
Lookup a type based on it's id.
|
boolean |
isArray() |
boolean |
isByteArray() |
boolean |
isCompound() |
boolean |
isIntArray() |
boolean |
isList() |
boolean |
isNumber() |
boolean |
isString() |
NBTBaseTag<T> |
newTag()
Create a fresh tag of this type.
|
NBTBaseTag<T> |
wrapHandle(java.lang.Object handle)
Wrap the nms handle in a wrapper of the correct type
|
public static final NBTType<java.lang.Byte> BYTE
public static final NBTType<java.lang.Short> SHORT
public static final NBTType<java.lang.Integer> INT
public static final NBTType<java.lang.Long> LONG
public static final NBTType<java.lang.Float> FLOAT
public static final NBTType<java.lang.Double> DOUBLE
public static final NBTType<byte[]> BYTE_ARRAY
public static final NBTType<java.lang.String> STRING
public static final NBTType<NBTListTag> LIST
public static final NBTType<NBTCompoundTag> COMPOUND
public static final NBTType<int[]> INT_ARRAY
public final int ID
public NBTBaseTag<T> newTag()
NBTListTag
or NBTCompoundTag
or equivalently with a NBTBaseTag.get()
call.NBTCompoundTag tag = NBTType.COMPOUND.newTag().get();
public NBTBaseTag<T> wrapHandle(java.lang.Object handle) throws java.lang.ClassCastException
handle
- the handle to wrapjava.lang.ClassCastException
- if the handle is not a tag of this tag typepublic static java.lang.String getName(int type)
public static NBTType getType(int type)
type
- the type idjava.lang.IllegalArgumentException
- if the type id does not correspond to
any of the known typespublic boolean isNumber()
public boolean isArray()
public boolean isByteArray()
public boolean isIntArray()
public boolean isString()
public boolean isList()
public boolean isCompound()