Class StringNbtWriter

java.lang.Object
net.minecraft.nbt.visitor.StringNbtWriter
All Implemented Interfaces:
NbtTagVisitor

public class StringNbtWriter
extends Object
implements NbtTagVisitor
A simple converter to turn NBT into single-line SNBT. The output may be parsed back into binary NBT.
Mappings:
Namespace Name
official nh
intermediary net/minecraft/class_5626
named net/minecraft/nbt/visitor/StringNbtWriter
  • Field Details

    • SIMPLE_NAME

      private static final Pattern SIMPLE_NAME
      Mappings:
      Namespace Name Mixin selector
      official a Lnh;a:Ljava/util/regex/Pattern;
      intermediary field_27829 Lnet/minecraft/class_5626;field_27829:Ljava/util/regex/Pattern;
      named SIMPLE_NAME Lnet/minecraft/nbt/visitor/StringNbtWriter;SIMPLE_NAME:Ljava/util/regex/Pattern;
    • result

      private final StringBuilder result
      Mappings:
      Namespace Name Mixin selector
      official b Lnh;b:Ljava/lang/StringBuilder;
      intermediary field_27830 Lnet/minecraft/class_5626;field_27830:Ljava/lang/StringBuilder;
      named result Lnet/minecraft/nbt/visitor/StringNbtWriter;result:Ljava/lang/StringBuilder;
  • Constructor Details

    • StringNbtWriter

      public StringNbtWriter()
  • Method Details

    • apply

      public String apply​(Tag tag)
      Mappings:
      Namespace Name Mixin selector
      official a Lnh;a(Lni;)Ljava/lang/String;
      intermediary method_32288 Lnet/minecraft/class_5626;method_32288(Lnet/minecraft/class_2520;)Ljava/lang/String;
      named apply Lnet/minecraft/nbt/visitor/StringNbtWriter;apply(Lnet/minecraft/nbt/Tag;)Ljava/lang/String;
    • visitStringTag

      public void visitStringTag​(StringTag tag)
      Specified by:
      visitStringTag in interface NbtTagVisitor
      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

      public void visitByteTag​(ByteTag tag)
      Specified by:
      visitByteTag in interface NbtTagVisitor
      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

      public void visitShortTag​(ShortTag tag)
      Specified by:
      visitShortTag in interface NbtTagVisitor
      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

      public void visitIntTag​(IntTag tag)
      Specified by:
      visitIntTag in interface NbtTagVisitor
      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

      public void visitLongTag​(LongTag tag)
      Specified by:
      visitLongTag in interface NbtTagVisitor
      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

      public void visitFloatTag​(FloatTag tag)
      Specified by:
      visitFloatTag in interface NbtTagVisitor
      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

      public void visitDoubleTag​(DoubleTag tag)
      Specified by:
      visitDoubleTag in interface NbtTagVisitor
      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

      public void visitByteArrayTag​(ByteArrayTag tag)
      Specified by:
      visitByteArrayTag in interface NbtTagVisitor
      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

      public void visitIntArrayTag​(IntArrayTag tag)
      Specified by:
      visitIntArrayTag in interface NbtTagVisitor
      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

      public void visitLongArrayTag​(LongArrayTag tag)
      Specified by:
      visitLongArrayTag in interface NbtTagVisitor
      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

      public void visitListTag​(ListTag tag)
      Specified by:
      visitListTag in interface NbtTagVisitor
      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

      public void visitCompoundTag​(CompoundTag tag)
      Specified by:
      visitCompoundTag in interface NbtTagVisitor
      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

      protected static String escapeName​(String name)
      Mappings:
      Namespace Name Mixin selector
      official a Lnh;a(Ljava/lang/String;)Ljava/lang/String;
      intermediary method_32287 Lnet/minecraft/class_5626;method_32287(Ljava/lang/String;)Ljava/lang/String;
      named escapeName Lnet/minecraft/nbt/visitor/StringNbtWriter;escapeName(Ljava/lang/String;)Ljava/lang/String;
    • visitEndTag

      public void visitEndTag​(EndTag tag)
      Specified by:
      visitEndTag in interface NbtTagVisitor
      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