| Enum Constant and Description |
|---|
BYTE |
BYTE_ARRAY |
COMPOUND |
DOUBLE |
END
The end tag is only used for reading/writing and can not be instantiated.
|
FLOAT |
INT |
INT_ARRAY |
LIST |
LONG |
LONG_ARRAY
The long array tag has been added in minecraft 1.12.
|
SHORT |
STRING |
| Modifier and Type | Method and Description |
|---|---|
static NbtType |
byClass(java.lang.Class<? extends NbtTag> tagClass)
Get a type by its class.
|
static NbtType |
byDataType(java.lang.Class<?> dataType)
Get a type by its primitive class.
|
static NbtType |
byId(int id)
Get a type by its id.
|
static NbtType |
byName(java.lang.String name)
Get a type by its name.
|
java.lang.Class<?> |
getDataType() |
int |
getId() |
java.lang.Class<? extends NbtTag> |
getTagClass() |
boolean |
isNumber() |
NbtTag |
newInstance() |
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 END
public static final NbtType BYTE
public static final NbtType SHORT
public static final NbtType INT
public static final NbtType LONG
public static final NbtType FLOAT
public static final NbtType DOUBLE
public static final NbtType BYTE_ARRAY
public static final NbtType STRING
public static final NbtType LIST
public static final NbtType COMPOUND
public static final NbtType INT_ARRAY
public static final NbtType LONG_ARRAY
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 null@Nullable public static NbtType byName(java.lang.String name)
name - The name of the type@Nullable public static NbtType byId(int id)
id - The id of the type@Nullable public static NbtType byClass(java.lang.Class<? extends NbtTag> tagClass)
tagClass - The class of the type@Nullable public static NbtType byDataType(java.lang.Class<?> dataType)
dataType - The primitive class of the typepublic int getId()
public java.lang.Class<? extends NbtTag> getTagClass()
public NbtTag newInstance()
java.lang.IllegalStateException - If the type is ENDpublic java.lang.Class<?> getDataType()
public boolean isNumber()