Package net.minecraft.nbt.visitor
Class NbtTextFormatter
java.lang.Object
net.minecraft.nbt.visitor.NbtTextFormatter
- All Implemented Interfaces:
NbtTagVisitor
public class NbtTextFormatter extends Object implements NbtTagVisitor
Formats an NBT tag into a colored, multiline
Text
representation suitable for human-readable
displays.- Mappings:
Namespace Name official nn
intermediary net/minecraft/class_5628
named net/minecraft/nbt/visitor/NbtTextFormatter
-
Field Summary
Fields Modifier and Type Field Description private static String
ENTRY_SEPARATOR
private int
indentationLevel
private static String
KEY_VALUE_SEPARATOR
private static Logger
LOGGER
private static Formatting
NAME_COLOR
private static Formatting
NUMBER_COLOR
private String
prefix
private Text
result
private static Pattern
SIMPLE_NAME
private static ByteCollection
SINGLE_LINE_ELEMENT_TYPES
private static Formatting
STRING_COLOR
private static Formatting
TYPE_SUFFIX_COLOR
-
Constructor Summary
Constructors Constructor Description NbtTextFormatter(String prefix, int indentationLevel)
-
Method Summary
Modifier and Type Method Description Text
apply(Tag tag)
protected static Text
escapeName(String name)
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
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Lnn;a:Lorg/apache/logging/log4j/Logger;
intermediary field_27831
Lnet/minecraft/class_5628;field_27831:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/nbt/visitor/NbtTextFormatter;LOGGER:Lorg/apache/logging/log4j/Logger;
-
SINGLE_LINE_ELEMENT_TYPES
- Mappings:
Namespace Name Mixin selector official b
Lnn;b:Lit/unimi/dsi/fastutil/bytes/ByteCollection;
intermediary field_27832
Lnet/minecraft/class_5628;field_27832:Lit/unimi/dsi/fastutil/bytes/ByteCollection;
named SINGLE_LINE_ELEMENT_TYPES
Lnet/minecraft/nbt/visitor/NbtTextFormatter;SINGLE_LINE_ELEMENT_TYPES:Lit/unimi/dsi/fastutil/bytes/ByteCollection;
-
NAME_COLOR
- Mappings:
Namespace Name Mixin selector official c
Lnn;c:Lk;
intermediary field_27833
Lnet/minecraft/class_5628;field_27833:Lnet/minecraft/class_124;
named NAME_COLOR
Lnet/minecraft/nbt/visitor/NbtTextFormatter;NAME_COLOR:Lnet/minecraft/util/Formatting;
-
STRING_COLOR
- Mappings:
Namespace Name Mixin selector official d
Lnn;d:Lk;
intermediary field_27834
Lnet/minecraft/class_5628;field_27834:Lnet/minecraft/class_124;
named STRING_COLOR
Lnet/minecraft/nbt/visitor/NbtTextFormatter;STRING_COLOR:Lnet/minecraft/util/Formatting;
-
NUMBER_COLOR
- Mappings:
Namespace Name Mixin selector official e
Lnn;e:Lk;
intermediary field_27835
Lnet/minecraft/class_5628;field_27835:Lnet/minecraft/class_124;
named NUMBER_COLOR
Lnet/minecraft/nbt/visitor/NbtTextFormatter;NUMBER_COLOR:Lnet/minecraft/util/Formatting;
-
TYPE_SUFFIX_COLOR
- Mappings:
Namespace Name Mixin selector official f
Lnn;f:Lk;
intermediary field_27836
Lnet/minecraft/class_5628;field_27836:Lnet/minecraft/class_124;
named TYPE_SUFFIX_COLOR
Lnet/minecraft/nbt/visitor/NbtTextFormatter;TYPE_SUFFIX_COLOR:Lnet/minecraft/util/Formatting;
-
SIMPLE_NAME
- Mappings:
Namespace Name Mixin selector official g
Lnn;g:Ljava/util/regex/Pattern;
intermediary field_27837
Lnet/minecraft/class_5628;field_27837:Ljava/util/regex/Pattern;
named SIMPLE_NAME
Lnet/minecraft/nbt/visitor/NbtTextFormatter;SIMPLE_NAME:Ljava/util/regex/Pattern;
-
KEY_VALUE_SEPARATOR
- Mappings:
Namespace Name Mixin selector official h
Lnn;h:Ljava/lang/String;
intermediary field_27838
Lnet/minecraft/class_5628;field_27838:Ljava/lang/String;
named KEY_VALUE_SEPARATOR
Lnet/minecraft/nbt/visitor/NbtTextFormatter;KEY_VALUE_SEPARATOR:Ljava/lang/String;
-
ENTRY_SEPARATOR
- Mappings:
Namespace Name Mixin selector official i
Lnn;i:Ljava/lang/String;
intermediary field_27839
Lnet/minecraft/class_5628;field_27839:Ljava/lang/String;
named ENTRY_SEPARATOR
Lnet/minecraft/nbt/visitor/NbtTextFormatter;ENTRY_SEPARATOR:Ljava/lang/String;
-
prefix
- Mappings:
Namespace Name Mixin selector official j
Lnn;j:Ljava/lang/String;
intermediary field_27840
Lnet/minecraft/class_5628;field_27840:Ljava/lang/String;
named prefix
Lnet/minecraft/nbt/visitor/NbtTextFormatter;prefix:Ljava/lang/String;
-
indentationLevel
private final int indentationLevel- Mappings:
Namespace Name Mixin selector official k
Lnn;k:I
intermediary field_27841
Lnet/minecraft/class_5628;field_27841:I
named indentationLevel
Lnet/minecraft/nbt/visitor/NbtTextFormatter;indentationLevel:I
-
result
- Mappings:
Namespace Name Mixin selector official l
Lnn;l:Loi;
intermediary field_27842
Lnet/minecraft/class_5628;field_27842:Lnet/minecraft/class_2561;
named result
Lnet/minecraft/nbt/visitor/NbtTextFormatter;result:Lnet/minecraft/text/Text;
-
-
Constructor Details
-
NbtTextFormatter
- Mappings:
Namespace Name Mixin selector official <init>
Lnn;<init>(Ljava/lang/String;I)V
intermediary <init>
Lnet/minecraft/class_5628;<init>(Ljava/lang/String;I)V
named <init>
Lnet/minecraft/nbt/visitor/NbtTextFormatter;<init>(Ljava/lang/String;I)V
-
-
Method Details
-
apply
- Mappings:
Namespace Name Mixin selector official a
Lnn;a(Lni;)Loi;
intermediary method_32305
Lnet/minecraft/class_5628;method_32305(Lnet/minecraft/class_2520;)Lnet/minecraft/class_2561;
named apply
Lnet/minecraft/nbt/visitor/NbtTextFormatter;apply(Lnet/minecraft/nbt/Tag;)Lnet/minecraft/text/Text;
-
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
-
escapeName
- Mappings:
Namespace Name Mixin selector official a
Lnn;a(Ljava/lang/String;)Loi;
intermediary method_32304
Lnet/minecraft/class_5628;method_32304(Ljava/lang/String;)Lnet/minecraft/class_2561;
named escapeName
Lnet/minecraft/nbt/visitor/NbtTextFormatter;escapeName(Ljava/lang/String;)Lnet/minecraft/text/Text;
-
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
-