public abstract class NBTBase extends Object
Modifier and Type | Method and Description |
---|---|
abstract NBTBase |
copy()
Creates a clone of the tag.
|
boolean |
equals(Object par1Obj) |
abstract byte |
getId()
Gets the type byte for the tag.
|
String |
getName()
Gets the name corresponding to the tag, or an empty string if none set.
|
static String |
getTagName(byte par0)
Returns the string name of a tag with the specified type, or 'UNKNOWN' if invalid.
|
int |
hashCode() |
static NBTBase |
newTag(byte par0,
String par1Str)
Creates and returns a new tag of the specified type, or null if invalid.
|
static NBTBase |
readNamedTag(DataInput par0DataInput)
Reads and returns a tag from the given DataInput, or the End tag if no tag could be read.
|
NBTBase |
setName(String par1Str)
Sets the name for this tag and returns this for convenience.
|
static void |
writeNamedTag(NBTBase par0NBTBase,
DataOutput par1DataOutput)
Writes the specified tag to the given DataOutput, writing the type byte, the UTF string key and then calling the
tag to write its data.
|
public static final String[] NBTTypes
public abstract byte getId()
public NBTBase setName(String par1Str)
public String getName()
public static NBTBase readNamedTag(DataInput par0DataInput) throws IOException
IOException
public static void writeNamedTag(NBTBase par0NBTBase, DataOutput par1DataOutput) throws IOException
IOException
public static NBTBase newTag(byte par0, String par1Str)
public static String getTagName(byte par0)
public abstract NBTBase copy()