public abstract class Tag extends Object implements Cloneable
All tags must have a constructor with a single string parameter for reading tags (can be any visibility). Tags should also have setter methods specific to their value types.
| Constructor and Description |
|---|
Tag(String name)
Creates a tag with the specified name.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Tag |
clone() |
abstract void |
destringify(SNBTIO.StringifiedNBTReader in)
Parses this tag from stringified NBT.
|
boolean |
equals(Object obj) |
String |
getName()
Gets the name of this tag.
|
abstract Object |
getValue()
Gets the value of this tag.
|
abstract void |
read(DataInput in)
Reads this tag from an input stream.
|
abstract void |
stringify(SNBTIO.StringifiedNBTWriter out,
boolean linebreak,
int depth)
Write this tag as stringified NBT.
|
String |
toString() |
abstract void |
write(DataOutput out)
Writes this tag to an output stream.
|
public Tag(String name)
name - The name.public final String getName()
public abstract Object getValue()
public abstract void read(DataInput in) throws IOException
in - Stream to read from.IOException - If an I/O error occurs.public abstract void write(DataOutput out) throws IOException
out - Stream to write to.IOException - If an I/O error occurs.public abstract void destringify(SNBTIO.StringifiedNBTReader in) throws IOException
in - String to parse.IOExceptionpublic abstract void stringify(SNBTIO.StringifiedNBTWriter out, boolean linebreak, int depth) throws IOException
IOExceptionCopyright © 2021. All rights reserved.