Package net.minecraft.nbt
Class NbtString
java.lang.Object
net.minecraft.nbt.NbtString
- All Implemented Interfaces:
- NbtElement
Represents an NBT string. Its type is 0x8.
 Instances are immutable.
- Mappings:
- Namespace - Name - official - ri- intermediary - net/minecraft/class_2519- named - net/minecraft/nbt/NbtString
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final charprivate static final charprivate static final NbtStringprivate static final charprivate static final charprivate static final intprivate final StringFields inherited from interface net.minecraft.nbt.NbtElementBYTE_ARRAY_TYPE, BYTE_TYPE, COMPOUND_TYPE, DOUBLE_TYPE, END_TYPE, field_33246, field_33247, field_33248, field_33249, FLOAT_TYPE, INT_ARRAY_TYPE, INT_TYPE, LIST_TYPE, LONG_ARRAY_TYPE, LONG_TYPE, MAX_DEPTH, NUMBER_TYPE, SHORT_TYPE, STRING_TYPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaccept(NbtElementVisitor visitor) asString()Returns the NBT's string representation.copy()Returns an NBT element of equal value that won't change with this element.doAccept(NbtScanner visitor) booleanstatic StringReturns the string quoted with quotes and backslashes escaped.Returns the NBT type definition of this NBT element.intbytegetType()Returns the type of this NBT element.inthashCode()static NbtStringReturns the NBT string fromvalue.static voidtoString()voidwrite(DataOutput output) Writes the NBT element tooutput.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.nbt.NbtElementaccept
- 
Field Details- 
SIZEprivate static final int SIZE- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lri;b:I- intermediary - field_41729- Lnet/minecraft/class_2519;field_41729:I- named - SIZE- Lnet/minecraft/nbt/NbtString;SIZE:I
 
- 
TYPE- Mappings:
- Namespace - Name - Mixin selector - official - a- Lri;a:Lrm;- intermediary - field_21045- Lnet/minecraft/class_2519;field_21045:Lnet/minecraft/class_4614;- named - TYPE- Lnet/minecraft/nbt/NbtString;TYPE:Lnet/minecraft/nbt/NbtType;
 
- 
EMPTY- Mappings:
- Namespace - Name - Mixin selector - official - c- Lri;c:Lri;- intermediary - field_21046- Lnet/minecraft/class_2519;field_21046:Lnet/minecraft/class_2519;- named - EMPTY- Lnet/minecraft/nbt/NbtString;EMPTY:Lnet/minecraft/nbt/NbtString;
 
- 
DOUBLE_QUOTEprivate static final char DOUBLE_QUOTE- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - w- Lri;w:C- intermediary - field_33242- Lnet/minecraft/class_2519;field_33242:C- named - DOUBLE_QUOTE- Lnet/minecraft/nbt/NbtString;DOUBLE_QUOTE:C
 
- 
SINGLE_QUOTEprivate static final char SINGLE_QUOTE- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - x- Lri;x:C- intermediary - field_33243- Lnet/minecraft/class_2519;field_33243:C- named - SINGLE_QUOTE- Lnet/minecraft/nbt/NbtString;SINGLE_QUOTE:C
 
- 
BACKSLASHprivate static final char BACKSLASH- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - y- Lri;y:C- intermediary - field_33244- Lnet/minecraft/class_2519;field_33244:C- named - BACKSLASH- Lnet/minecraft/nbt/NbtString;BACKSLASH:C
 
- 
NULLprivate static final char NULL- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - z- Lri;z:C- intermediary - field_33245- Lnet/minecraft/class_2519;field_33245:C- named - NULL- Lnet/minecraft/nbt/NbtString;NULL:C
 
- 
value- Mappings:
- Namespace - Name - Mixin selector - official - A- Lri;A:Ljava/lang/String;- intermediary - field_11590- Lnet/minecraft/class_2519;field_11590:Ljava/lang/String;- named - value- Lnet/minecraft/nbt/NbtString;value:Ljava/lang/String;
 
 
- 
- 
Constructor Details- 
NbtString- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lri;<init>(Ljava/lang/String;)V- intermediary - <init>- Lnet/minecraft/class_2519;<init>(Ljava/lang/String;)V- named - <init>- Lnet/minecraft/nbt/NbtString;<init>(Ljava/lang/String;)V
 
 
- 
- 
Method Details- 
skip- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lri;a(Ljava/io/DataInput;)V- intermediary - method_39875- Lnet/minecraft/class_2519;method_39875(Ljava/io/DataInput;)V- named - skip- Lnet/minecraft/nbt/NbtString;skip(Ljava/io/DataInput;)V
 
- 
ofReturns the NBT string fromvalue.- Returns:
- the NBT string from value
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lri;a(Ljava/lang/String;)Lri;- intermediary - method_23256- Lnet/minecraft/class_2519;method_23256(Ljava/lang/String;)Lnet/minecraft/class_2519;- named - of- Lnet/minecraft/nbt/NbtString;of(Ljava/lang/String;)Lnet/minecraft/nbt/NbtString;
 
- 
writeWrites the NBT element tooutput.- Specified by:
- writein interface- NbtElement
- Throws:
- IOException
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lrk;a(Ljava/io/DataOutput;)V- intermediary - method_10713- Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)V- named - write- Lnet/minecraft/nbt/NbtElement;write(Ljava/io/DataOutput;)V
 
- 
getSizeInBytespublic int getSizeInBytes()- Specified by:
- getSizeInBytesin interface- NbtElement
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lrk;a()I- intermediary - method_47988- Lnet/minecraft/class_2520;method_47988()I- named - getSizeInBytes- Lnet/minecraft/nbt/NbtElement;getSizeInBytes()I
 
- 
getTypepublic byte getType()Returns the type of this NBT element.- Specified by:
- getTypein interface- NbtElement
- Returns:
- the type of this NBT element
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lrk;b()B- intermediary - method_10711- Lnet/minecraft/class_2520;method_10711()B- named - getType- Lnet/minecraft/nbt/NbtElement;getType()B
 
- 
getNbtTypeReturns the NBT type definition of this NBT element.- Specified by:
- getNbtTypein interface- NbtElement
- Returns:
- the NBT type definition of this NBT element
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lrk;c()Lrm;- intermediary - method_23258- Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;- named - getNbtType- Lnet/minecraft/nbt/NbtElement;getNbtType()Lnet/minecraft/nbt/NbtType;
 
- 
toString- Specified by:
- toStringin interface- NbtElement
- Overrides:
- toStringin class- Object
 
- 
copyDescription copied from interface:NbtElementReturns an NBT element of equal value that won't change with this element.- Specified by:
- copyin interface- NbtElement
- Returns:
- an NBT element of equal value that won't change with this element
- Mappings:
- Namespace - Name - Mixin selector - official - e- Lri;e()Lri;- intermediary - method_10705- Lnet/minecraft/class_2519;method_10705()Lnet/minecraft/class_2519;- named - copy- Lnet/minecraft/nbt/NbtString;copy()Lnet/minecraft/nbt/NbtString;
 
- 
equals
- 
hashCodepublic int hashCode()
- 
asStringReturns the NBT's string representation.- Specified by:
- asStringin interface- NbtElement
- Returns:
- the NBT's string representation
- Mappings:
- Namespace - Name - Mixin selector - official - m_- Lrk;m_()Ljava/lang/String;- intermediary - method_10714- Lnet/minecraft/class_2520;method_10714()Ljava/lang/String;- named - asString- Lnet/minecraft/nbt/NbtElement;asString()Ljava/lang/String;
 
- 
accept- Specified by:
- acceptin interface- NbtElement
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lrk;a(Lro;)V- intermediary - method_32289- Lnet/minecraft/class_2520;method_32289(Lnet/minecraft/class_5627;)V- named - accept- Lnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/visitor/NbtElementVisitor;)V
 
- 
escapeReturns the string quoted with quotes and backslashes escaped.- Returns:
- the string quoted with quotes and backslashes escaped
- Implementation Note:
- If valuecontains one of the singlequote or the double quote, it tries to use the other quotes to quote the string. If both appear, then the quote that appeared later will be used to quote the string. If neither of them appears, this uses a double quote. For example, the stringIt's a "Tiny Potato"!will be escaped as"It's a \"Tiny Potato\"!", while the stringIt is a "Tiny Potato"!will be escaped as'It is a "Tiny Potato"!'.
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lri;b(Ljava/lang/String;)Ljava/lang/String;- intermediary - method_10706- Lnet/minecraft/class_2519;method_10706(Ljava/lang/String;)Ljava/lang/String;- named - escape- Lnet/minecraft/nbt/NbtString;escape(Ljava/lang/String;)Ljava/lang/String;
 
- 
doAccept- Specified by:
- doAcceptin interface- NbtElement
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lrk;a(Lrh;)Lrh$b;- intermediary - method_39850- Lnet/minecraft/class_2520;method_39850(Lnet/minecraft/class_6836;)Lnet/minecraft/class_6836$class_6838;- named - doAccept- Lnet/minecraft/nbt/NbtElement;doAccept(Lnet/minecraft/nbt/scanner/NbtScanner;)Lnet/minecraft/nbt/scanner/NbtScanner$Result;
 
 
-