Package net.minecraft.nbt.visitor
Class NbtOrderedStringFormatter
java.lang.Object
net.minecraft.nbt.visitor.NbtOrderedStringFormatter
- All Implemented Interfaces:
NbtElementVisitor
Formats an NBT element as a multiline string where named elements inside of compound objects
are sorted according to a defined ordering.
- Mappings:
Namespace Name official oq
intermediary net/minecraft/class_5625
named net/minecraft/nbt/visitor/NbtOrderedStringFormatter
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private static final String
Contains the names of elements which should appear before any other element in a compound object, even when they would otherwise appear later lexicographically.private static final String
Contains paths for which the indentation prefix should not be prepended to the result.private final int
private static final String
private static final String
private final String
private String
private static final String
private static final Pattern
private static final String
private static final String
private static final String
-
Constructor Summary
ConstructorDescriptionNbtOrderedStringFormatter
(String prefix, int indentationLevel, List<String> pathParts) -
Method Summary
Modifier and TypeMethodDescriptionapply
(NbtElement element) protected static String
escapeName
(String name) getSortedNames
(NbtCompound compound) joinPath()
private void
private void
pushPathPart
(String part) void
void
visitByteArray
(NbtByteArray element) void
visitCompound
(NbtCompound compound) void
visitDouble
(NbtDouble element) void
visitFloat
(NbtFloat element) void
void
visitIntArray
(NbtIntArray element) void
void
void
visitLongArray
(NbtLongArray element) void
void
visitShort
(NbtShort element) void
visitString
(NbtString element)
-
Field Details
-
ENTRY_ORDER_OVERRIDES
Contains the names of elements which should appear before any other element in a compound object, even when they would otherwise appear later lexicographically. The list of elements which should be prioritized differs depending on the path of the compound object.- Mappings:
Namespace Name Mixin selector official a
Loq;a:Ljava/util/Map;
intermediary field_27820
Lnet/minecraft/class_5625;field_27820:Ljava/util/Map;
named ENTRY_ORDER_OVERRIDES
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;ENTRY_ORDER_OVERRIDES:Ljava/util/Map;
-
IGNORED_PATHS
Contains paths for which the indentation prefix should not be prepended to the result.- Mappings:
Namespace Name Mixin selector official b
Loq;b:Ljava/util/Set;
intermediary field_27821
Lnet/minecraft/class_5625;field_27821:Ljava/util/Set;
named IGNORED_PATHS
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;IGNORED_PATHS:Ljava/util/Set;
-
SIMPLE_NAME
- Mappings:
Namespace Name Mixin selector official c
Loq;c:Ljava/util/regex/Pattern;
intermediary field_27822
Lnet/minecraft/class_5625;field_27822:Ljava/util/regex/Pattern;
named SIMPLE_NAME
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;SIMPLE_NAME:Ljava/util/regex/Pattern;
-
KEY_VALUE_SEPARATOR
- Mappings:
Namespace Name Mixin selector official d
Loq;d:Ljava/lang/String;
intermediary field_27823
Lnet/minecraft/class_5625;field_27823:Ljava/lang/String;
named KEY_VALUE_SEPARATOR
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;KEY_VALUE_SEPARATOR:Ljava/lang/String;
-
ENTRY_SEPARATOR
- Mappings:
Namespace Name Mixin selector official e
Loq;e:Ljava/lang/String;
intermediary field_27824
Lnet/minecraft/class_5625;field_27824:Ljava/lang/String;
named ENTRY_SEPARATOR
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;ENTRY_SEPARATOR:Ljava/lang/String;
-
SQUARE_OPEN_BRACKET
- See Also:
- Mappings:
Namespace Name Mixin selector official f
Loq;f:Ljava/lang/String;
intermediary field_33234
Lnet/minecraft/class_5625;field_33234:Ljava/lang/String;
named SQUARE_OPEN_BRACKET
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;SQUARE_OPEN_BRACKET:Ljava/lang/String;
-
SQUARE_CLOSE_BRACKET
- See Also:
- Mappings:
Namespace Name Mixin selector official g
Loq;g:Ljava/lang/String;
intermediary field_33235
Lnet/minecraft/class_5625;field_33235:Ljava/lang/String;
named SQUARE_CLOSE_BRACKET
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;SQUARE_CLOSE_BRACKET:Ljava/lang/String;
-
SEMICOLON
- See Also:
- Mappings:
Namespace Name Mixin selector official h
Loq;h:Ljava/lang/String;
intermediary field_33236
Lnet/minecraft/class_5625;field_33236:Ljava/lang/String;
named SEMICOLON
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;SEMICOLON:Ljava/lang/String;
-
SPACE
- See Also:
- Mappings:
Namespace Name Mixin selector official i
Loq;i:Ljava/lang/String;
intermediary field_33237
Lnet/minecraft/class_5625;field_33237:Ljava/lang/String;
named SPACE
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;SPACE:Ljava/lang/String;
-
CURLY_OPEN_BRACKET
- See Also:
- Mappings:
Namespace Name Mixin selector official j
Loq;j:Ljava/lang/String;
intermediary field_33238
Lnet/minecraft/class_5625;field_33238:Ljava/lang/String;
named CURLY_OPEN_BRACKET
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;CURLY_OPEN_BRACKET:Ljava/lang/String;
-
CURLY_CLOSE_BRACKET
- See Also:
- Mappings:
Namespace Name Mixin selector official k
Loq;k:Ljava/lang/String;
intermediary field_33239
Lnet/minecraft/class_5625;field_33239:Ljava/lang/String;
named CURLY_CLOSE_BRACKET
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;CURLY_CLOSE_BRACKET:Ljava/lang/String;
-
NEW_LINE
- See Also:
- Mappings:
Namespace Name Mixin selector official l
Loq;l:Ljava/lang/String;
intermediary field_33240
Lnet/minecraft/class_5625;field_33240:Ljava/lang/String;
named NEW_LINE
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;NEW_LINE:Ljava/lang/String;
-
prefix
- Mappings:
Namespace Name Mixin selector official m
Loq;m:Ljava/lang/String;
intermediary field_27825
Lnet/minecraft/class_5625;field_27825:Ljava/lang/String;
named prefix
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;prefix:Ljava/lang/String;
-
indentationLevel
private final int indentationLevel- Mappings:
Namespace Name Mixin selector official n
Loq;n:I
intermediary field_27826
Lnet/minecraft/class_5625;field_27826:I
named indentationLevel
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;indentationLevel:I
-
pathParts
- Mappings:
Namespace Name Mixin selector official o
Loq;o:Ljava/util/List;
intermediary field_27827
Lnet/minecraft/class_5625;field_27827:Ljava/util/List;
named pathParts
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;pathParts:Ljava/util/List;
-
result
- Mappings:
Namespace Name Mixin selector official p
Loq;p:Ljava/lang/String;
intermediary field_27828
Lnet/minecraft/class_5625;field_27828:Ljava/lang/String;
named result
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;result:Ljava/lang/String;
-
-
Constructor Details
-
NbtOrderedStringFormatter
public NbtOrderedStringFormatter() -
NbtOrderedStringFormatter
- Mappings:
Namespace Name Mixin selector official <init>
Loq;<init>(Ljava/lang/String;ILjava/util/List;)V
intermediary <init>
Lnet/minecraft/class_5625;<init>(Ljava/lang/String;ILjava/util/List;)V
named <init>
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;<init>(Ljava/lang/String;ILjava/util/List;)V
-
-
Method Details
-
apply
- Mappings:
Namespace Name Mixin selector official a
Loq;a(Lot;)Ljava/lang/String;
intermediary method_32283
Lnet/minecraft/class_5625;method_32283(Lnet/minecraft/class_2520;)Ljava/lang/String;
named apply
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;apply(Lnet/minecraft/nbt/NbtElement;)Ljava/lang/String;
-
visitString
- Specified by:
visitString
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Lor;)V
intermediary method_32302
Lnet/minecraft/class_5627;method_32302(Lnet/minecraft/class_2519;)V
named visitString
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitString(Lnet/minecraft/nbt/NbtString;)V
-
visitByte
- Specified by:
visitByte
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Lnz;)V
intermediary method_32291
Lnet/minecraft/class_5627;method_32291(Lnet/minecraft/class_2481;)V
named visitByte
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitByte(Lnet/minecraft/nbt/NbtByte;)V
-
visitShort
- Specified by:
visitShort
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Lop;)V
intermediary method_32301
Lnet/minecraft/class_5627;method_32301(Lnet/minecraft/class_2516;)V
named visitShort
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitShort(Lnet/minecraft/nbt/NbtShort;)V
-
visitInt
- Specified by:
visitInt
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Log;)V
intermediary method_32297
Lnet/minecraft/class_5627;method_32297(Lnet/minecraft/class_2497;)V
named visitInt
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitInt(Lnet/minecraft/nbt/NbtInt;)V
-
visitLong
- Specified by:
visitLong
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Loj;)V
intermediary method_32300
Lnet/minecraft/class_5627;method_32300(Lnet/minecraft/class_2503;)V
named visitLong
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitLong(Lnet/minecraft/nbt/NbtLong;)V
-
visitFloat
- Specified by:
visitFloat
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Loe;)V
intermediary method_32295
Lnet/minecraft/class_5627;method_32295(Lnet/minecraft/class_2494;)V
named visitFloat
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitFloat(Lnet/minecraft/nbt/NbtFloat;)V
-
visitDouble
- Specified by:
visitDouble
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Loc;)V
intermediary method_32293
Lnet/minecraft/class_5627;method_32293(Lnet/minecraft/class_2489;)V
named visitDouble
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitDouble(Lnet/minecraft/nbt/NbtDouble;)V
-
visitByteArray
- Specified by:
visitByteArray
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Lny;)V
intermediary method_32290
Lnet/minecraft/class_5627;method_32290(Lnet/minecraft/class_2479;)V
named visitByteArray
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitByteArray(Lnet/minecraft/nbt/NbtByteArray;)V
-
visitIntArray
- Specified by:
visitIntArray
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Lof;)V
intermediary method_32296
Lnet/minecraft/class_5627;method_32296(Lnet/minecraft/class_2495;)V
named visitIntArray
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitIntArray(Lnet/minecraft/nbt/NbtIntArray;)V
-
visitLongArray
- Specified by:
visitLongArray
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Loi;)V
intermediary method_32299
Lnet/minecraft/class_5627;method_32299(Lnet/minecraft/class_2501;)V
named visitLongArray
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitLongArray(Lnet/minecraft/nbt/NbtLongArray;)V
-
visitList
- Specified by:
visitList
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Loh;)V
intermediary method_32298
Lnet/minecraft/class_5627;method_32298(Lnet/minecraft/class_2499;)V
named visitList
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitList(Lnet/minecraft/nbt/NbtList;)V
-
visitCompound
- Specified by:
visitCompound
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Lob;)V
intermediary method_32292
Lnet/minecraft/class_5627;method_32292(Lnet/minecraft/class_2487;)V
named visitCompound
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitCompound(Lnet/minecraft/nbt/NbtCompound;)V
-
popPathPart
private void popPathPart()- Mappings:
Namespace Name Mixin selector official b
Loq;b()V
intermediary method_32284
Lnet/minecraft/class_5625;method_32284()V
named popPathPart
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;popPathPart()V
-
pushPathPart
- Mappings:
Namespace Name Mixin selector official b
Loq;b(Ljava/lang/String;)V
intermediary method_32285
Lnet/minecraft/class_5625;method_32285(Ljava/lang/String;)V
named pushPathPart
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;pushPathPart(Ljava/lang/String;)V
-
getSortedNames
- Mappings:
Namespace Name Mixin selector official b
Loq;b(Lob;)Ljava/util/List;
intermediary method_32286
Lnet/minecraft/class_5625;method_32286(Lnet/minecraft/class_2487;)Ljava/util/List;
named getSortedNames
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;getSortedNames(Lnet/minecraft/nbt/NbtCompound;)Ljava/util/List;
-
joinPath
- Mappings:
Namespace Name Mixin selector official a
Loq;a()Ljava/lang/String;
intermediary method_32280
Lnet/minecraft/class_5625;method_32280()Ljava/lang/String;
named joinPath
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;joinPath()Ljava/lang/String;
-
escapeName
- Mappings:
Namespace Name Mixin selector official a
Loq;a(Ljava/lang/String;)Ljava/lang/String;
intermediary method_32281
Lnet/minecraft/class_5625;method_32281(Ljava/lang/String;)Ljava/lang/String;
named escapeName
Lnet/minecraft/nbt/visitor/NbtOrderedStringFormatter;escapeName(Ljava/lang/String;)Ljava/lang/String;
-
visitNull
- Specified by:
visitNull
in interfaceNbtElementVisitor
- Mappings:
Namespace Name Mixin selector official a
Lox;a(Lod;)V
intermediary method_32294
Lnet/minecraft/class_5627;method_32294(Lnet/minecraft/class_2491;)V
named visitNull
Lnet/minecraft/nbt/visitor/NbtElementVisitor;visitNull(Lnet/minecraft/nbt/NbtNull;)V
-