Package net.minecraft.nbt
Class NbtString
java.lang.Object
net.minecraft.nbt.NbtString
- All Implemented Interfaces:
NbtElement
public class NbtString extends Object implements NbtElement
Represents an NBT string.
-
Field Summary
Fields Modifier and Type Field Description private static NbtStringEMPTYstatic NbtType<NbtString>TYPEprivate StringvalueFields inherited from interface net.minecraft.nbt.NbtElement
AQUA, GOLD, GREEN, RED -
Constructor Summary
-
Method Summary
Modifier and Type Method Description StringasString()NbtStringcopy()Copies this NBT element.booleanequals(Object o)static Stringescape(String value)NbtType<NbtString>getNbtType()Gets the NBT type definition of this NBT element.bytegetType()Gets the type of this NBT element.inthashCode()static NbtStringof(String value)StringtoString()TexttoText(String indent, int depth)voidwrite(DataOutput output)Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.nbt.NbtElement
toText
-
Field Details
-
TYPE
-
EMPTY
-
value
-
-
Constructor Details
-
NbtString
-
-
Method Details
-
of
-
write
- Specified by:
writein interfaceNbtElement- Throws:
IOException
-
getType
public byte getType()Gets the type of this NBT element.- Specified by:
getTypein interfaceNbtElement- Returns:
- the type
-
getNbtType
Gets the NBT type definition of this NBT element.- Specified by:
getNbtTypein interfaceNbtElement- Returns:
- the element type definition
-
toString
- Specified by:
toStringin interfaceNbtElement- Overrides:
toStringin classObject
-
copy
Description copied from interface:NbtElementCopies this NBT element.- Specified by:
copyin interfaceNbtElement- Returns:
- the copied element
-
equals
-
hashCode
public int hashCode() -
asString
- Specified by:
asStringin interfaceNbtElement
-
toText
- Specified by:
toTextin interfaceNbtElement
-
escape
-