Interface Tag
- All Known Subinterfaces:
NumberArrayTag, NumberTag
- All Known Implementing Classes:
ByteArrayTag, ByteTag, CompoundTag, DoubleTag, FloatTag, IntArrayTag, IntTag, ListTag, LongArrayTag, LongTag, MixedListTag, ShortTag, StringTag
public interface Tag
-
Method Summary
Modifier and TypeMethodDescriptionReturns the raw string representation of the value of this tag.copy()Returns a copy of this tag.intgetTagId()Returns the NBT tag id of this tag type, used in I/O.getValue()Returns the value of this tag.voidwrite(DataOutput out) Writes this tag to an output stream.
-
Method Details
-
getValue
-
asRawString
String asRawString()Returns the raw string representation of the value of this tag. For SNBT, useSNBT.serialize(Tag).- Returns:
- raw string representation of the value of this tag
-
write
Writes this tag to an output stream.- Parameters:
out- data output to write to- Throws:
IOException- if an I/O error occurs
-
getTagId
int getTagId()Returns the NBT tag id of this tag type, used in I/O.- Returns:
- ID of the tag this class represents
-
copy
-