public final class Tag<T> extends Object
A representation of Minecraft NBT tags.
Modifier and Type | Method and Description |
---|---|
T |
get()
Returns the value of this
Tag . |
NBT |
getType()
Returns an
NBT representing the type of this Tag . |
static Tag<Boolean> |
newBool(boolean data)
Creates a new byte tag.
|
static Tag<Byte> |
newByte(byte data)
Creates a new byte tag.
|
static Tag<byte[]> |
newByteArray(byte[] data)
Creates a new byte array tag.
|
static Tag<Map<String,Tag>> |
newCompound(Map<String,?> data)
Creates a new Map tag.
|
static Tag<Double> |
newDouble(double data)
Creates a new double tag.
|
static Tag<Float> |
newFloat(float data)
Creates a new float tag.
|
static Tag<Integer> |
newInt(int data)
Creates a new int tag.
|
static Tag<int[]> |
newIntArray(int[] data)
Creates a new int array tag.
|
static Tag<List<Tag>> |
newList(List data)
Creates a new List tag.
|
static Tag<Long> |
newLong(long data)
Creates a new long tag.
|
static Tag<Short> |
newShort(short data)
Creates a new short tag.
|
static Tag<String> |
newString(String data)
Creates a new String tag.
|
public static Tag<Boolean> newBool(boolean data)
data
- The byte.public static Tag<Byte> newByte(byte data)
data
- The byte.public static Tag<Short> newShort(short data)
data
- The short.public static Tag<Integer> newInt(int data)
data
- The int.public static Tag<Long> newLong(long data)
data
- The long.public static Tag<Float> newFloat(float data)
data
- The float.public static Tag<Double> newDouble(double data)
data
- The double.public static Tag<byte[]> newByteArray(byte[] data)
data
- The byte array.public static Tag<String> newString(String data)
data
- The String.public static Tag<List<Tag>> newList(List data) throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, NoSuchFieldException, NoSuchMethodException, NBTLibDisabledException, UnknownTagException
data
- The List.UnknownTagException
- If the List contains an element that can't be represented by a Tag
object.ClassNotFoundException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
NoSuchMethodException
NBTLibDisabledException
public static Tag<Map<String,Tag>> newCompound(Map<String,?> data) throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, NoSuchFieldException, NoSuchMethodException, NBTLibDisabledException, UnknownTagException
data
- The Map.UnknownTagException
- If the Map contains a value that can't be represented by a Tag
object.ClassNotFoundException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
NoSuchMethodException
NBTLibDisabledException
public static Tag<int[]> newIntArray(int[] data)
data
- The int array.public NBT getType()
NBT
representing the type of this Tag
.Tag
.public T get()
Tag
.Copyright © 2013. All Rights Reserved.