Package net.minecraft.nbt.visitor
Class NbtOrderedStringFormatter
java.lang.Object
net.minecraft.nbt.visitor.NbtOrderedStringFormatter
- All Implemented Interfaces:
NbtTagVisitor
public class NbtOrderedStringFormatter extends Object implements NbtTagVisitor
Formats an NBT tag as a multiline string where named tags inside of compounds are sorted
according to a defined ordering.
- Mappings:
Namespace Name official nf
intermediary net/minecraft/class_5625
named net/minecraft/nbt/visitor/NbtOrderedStringFormatter
-
Field Summary
Fields Modifier and Type Field Description private static Map<String,List<String>>
ENTRY_ORDER_OVERRIDES
Contains the names of tags which should appear before any other tag in a compound, even when they would otherwise appear later lexicographically.private static String
ENTRY_SEPARATOR
private static Set<String>
IGNORED_PATHS
Contains paths for which the indentation prefix should not be prepended to the result.private int
indentationLevel
private static String
KEY_VALUE_SEPARATOR
private List<String>
pathParts
private String
prefix
private String
result
private static Pattern
SIMPLE_NAME
-
Constructor Summary
Constructors Constructor Description NbtOrderedStringFormatter()
NbtOrderedStringFormatter(String prefix, int indentationLevel, List<String> pathParts)
-
Method Summary
Modifier and Type Method Description String
apply(Tag tag)
protected static String
escapeName(String name)
protected List<String>
getSortedNames(CompoundTag tag)
String
joinPath()
private void
popPathPart()
private void
pushPathPart(String part)
void
visitByteArrayTag(ByteArrayTag tag)
void
visitByteTag(ByteTag tag)
void
visitCompoundTag(CompoundTag tag)
void
visitDoubleTag(DoubleTag tag)
void
visitEndTag(EndTag tag)
void
visitFloatTag(FloatTag tag)
void
visitIntArrayTag(IntArrayTag tag)
void
visitIntTag(IntTag tag)
void
visitListTag(ListTag tag)
void
visitLongArrayTag(LongArrayTag tag)
void
visitLongTag(LongTag tag)
void
visitShortTag(ShortTag tag)
void
visitStringTag(StringTag tag)
-
Field Details
-
ENTRY_ORDER_OVERRIDES
Contains the names of tags which should appear before any other tag in a compound, even when they would otherwise appear later lexicographically. The list of tags which should be prioritized differs depending on the path of the compound.- Mappings:
Namespace Name Mixin selector official a
Lnf;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
Lnf;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
Lnf;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
Lnf;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
Lnf;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;
-
prefix
- Mappings:
Namespace Name Mixin selector official f
Lnf;f: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 g
Lnf;g: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 h
Lnf;h: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 i
Lnf;i: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>
Lnf;<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
Lnf;a(Lni;)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/Tag;)Ljava/lang/String;
-
visitStringTag
- Specified by:
visitStringTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lng;)V
intermediary method_32302
Lnet/minecraft/class_5627;method_32302(Lnet/minecraft/class_2519;)V
named visitStringTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitStringTag(Lnet/minecraft/nbt/StringTag;)V
-
visitByteTag
- Specified by:
visitByteTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmo;)V
intermediary method_32291
Lnet/minecraft/class_5627;method_32291(Lnet/minecraft/class_2481;)V
named visitByteTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitByteTag(Lnet/minecraft/nbt/ByteTag;)V
-
visitShortTag
- Specified by:
visitShortTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lne;)V
intermediary method_32301
Lnet/minecraft/class_5627;method_32301(Lnet/minecraft/class_2516;)V
named visitShortTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitShortTag(Lnet/minecraft/nbt/ShortTag;)V
-
visitIntTag
- Specified by:
visitIntTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmv;)V
intermediary method_32297
Lnet/minecraft/class_5627;method_32297(Lnet/minecraft/class_2497;)V
named visitIntTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitIntTag(Lnet/minecraft/nbt/IntTag;)V
-
visitLongTag
- Specified by:
visitLongTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmy;)V
intermediary method_32300
Lnet/minecraft/class_5627;method_32300(Lnet/minecraft/class_2503;)V
named visitLongTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitLongTag(Lnet/minecraft/nbt/LongTag;)V
-
visitFloatTag
- Specified by:
visitFloatTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmt;)V
intermediary method_32295
Lnet/minecraft/class_5627;method_32295(Lnet/minecraft/class_2494;)V
named visitFloatTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitFloatTag(Lnet/minecraft/nbt/FloatTag;)V
-
visitDoubleTag
- Specified by:
visitDoubleTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmr;)V
intermediary method_32293
Lnet/minecraft/class_5627;method_32293(Lnet/minecraft/class_2489;)V
named visitDoubleTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitDoubleTag(Lnet/minecraft/nbt/DoubleTag;)V
-
visitByteArrayTag
- Specified by:
visitByteArrayTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmn;)V
intermediary method_32290
Lnet/minecraft/class_5627;method_32290(Lnet/minecraft/class_2479;)V
named visitByteArrayTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitByteArrayTag(Lnet/minecraft/nbt/ByteArrayTag;)V
-
visitIntArrayTag
- Specified by:
visitIntArrayTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmu;)V
intermediary method_32296
Lnet/minecraft/class_5627;method_32296(Lnet/minecraft/class_2495;)V
named visitIntArrayTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitIntArrayTag(Lnet/minecraft/nbt/IntArrayTag;)V
-
visitLongArrayTag
- Specified by:
visitLongArrayTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmx;)V
intermediary method_32299
Lnet/minecraft/class_5627;method_32299(Lnet/minecraft/class_2501;)V
named visitLongArrayTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitLongArrayTag(Lnet/minecraft/nbt/LongArrayTag;)V
-
visitListTag
- Specified by:
visitListTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmw;)V
intermediary method_32298
Lnet/minecraft/class_5627;method_32298(Lnet/minecraft/class_2499;)V
named visitListTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitListTag(Lnet/minecraft/nbt/ListTag;)V
-
visitCompoundTag
- Specified by:
visitCompoundTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lmq;)V
intermediary method_32292
Lnet/minecraft/class_5627;method_32292(Lnet/minecraft/class_2487;)V
named visitCompoundTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitCompoundTag(Lnet/minecraft/nbt/CompoundTag;)V
-
popPathPart
private void popPathPart()- Mappings:
Namespace Name Mixin selector official b
Lnf;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
Lnf;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
Lnf;b(Lmq;)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/CompoundTag;)Ljava/util/List;
-
joinPath
- Mappings:
Namespace Name Mixin selector official a
Lnf;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
Lnf;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;
-
visitEndTag
- Specified by:
visitEndTag
in interfaceNbtTagVisitor
- Mappings:
Namespace Name Mixin selector official a
Lnm;a(Lms;)V
intermediary method_32294
Lnet/minecraft/class_5627;method_32294(Lnet/minecraft/class_2491;)V
named visitEndTag
Lnet/minecraft/nbt/visitor/NbtTagVisitor;visitEndTag(Lnet/minecraft/nbt/EndTag;)V
-