Class StringNbtReader

java.lang.Object
net.minecraft.nbt.StringNbtReader

public class StringNbtReader extends Object
A class for reading a stringified NBT.
API Note:
Methods in this class throw CommandSyntaxException to indicate syntax errors within the NBT representation.
Mappings:
Namespace Name
named net/minecraft/nbt/StringNbtReader
intermediary net/minecraft/class_2522
official vq
  • Field Details

    • TRAILING

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType TRAILING
      Mappings:
      Namespace Name Mixin selector
      named TRAILING Lnet/minecraft/nbt/StringNbtReader;TRAILING:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      intermediary field_11602 Lnet/minecraft/class_2522;field_11602:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      official a Lvq;a:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
    • EXPECTED_KEY

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXPECTED_KEY
      Mappings:
      Namespace Name Mixin selector
      named EXPECTED_KEY Lnet/minecraft/nbt/StringNbtReader;EXPECTED_KEY:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      intermediary field_11608 Lnet/minecraft/class_2522;field_11608:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      official b Lvq;b:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
    • EXPECTED_VALUE

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXPECTED_VALUE
      Mappings:
      Namespace Name Mixin selector
      named EXPECTED_VALUE Lnet/minecraft/nbt/StringNbtReader;EXPECTED_VALUE:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      intermediary field_11605 Lnet/minecraft/class_2522;field_11605:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      official c Lvq;c:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
    • LIST_MIXED

      public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType LIST_MIXED
      Mappings:
      Namespace Name Mixin selector
      named LIST_MIXED Lnet/minecraft/nbt/StringNbtReader;LIST_MIXED:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
      intermediary field_11603 Lnet/minecraft/class_2522;field_11603:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
      official d Lvq;d:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
    • ARRAY_MIXED

      public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ARRAY_MIXED
      Mappings:
      Namespace Name Mixin selector
      named ARRAY_MIXED Lnet/minecraft/nbt/StringNbtReader;ARRAY_MIXED:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
      intermediary field_11597 Lnet/minecraft/class_2522;field_11597:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
      official e Lvq;e:Lcom/mojang/brigadier/exceptions/Dynamic2CommandExceptionType;
    • ARRAY_INVALID

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ARRAY_INVALID
      Mappings:
      Namespace Name Mixin selector
      named ARRAY_INVALID Lnet/minecraft/nbt/StringNbtReader;ARRAY_INVALID:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
      intermediary field_11604 Lnet/minecraft/class_2522;field_11604:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
      official f Lvq;f:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
    • COMMA

      public static final char COMMA
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named COMMA Lnet/minecraft/nbt/StringNbtReader;COMMA:C
      intermediary field_33265 Lnet/minecraft/class_2522;field_33265:C
      official g Lvq;g:C
    • COLON

      public static final char COLON
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named COLON Lnet/minecraft/nbt/StringNbtReader;COLON:C
      intermediary field_33266 Lnet/minecraft/class_2522;field_33266:C
      official h Lvq;h:C
    • SQUARE_OPEN_BRACKET

      private static final char SQUARE_OPEN_BRACKET
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SQUARE_OPEN_BRACKET Lnet/minecraft/nbt/StringNbtReader;SQUARE_OPEN_BRACKET:C
      intermediary field_33267 Lnet/minecraft/class_2522;field_33267:C
      official k Lvq;k:C
    • SQUARE_CLOSE_BRACKET

      private static final char SQUARE_CLOSE_BRACKET
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SQUARE_CLOSE_BRACKET Lnet/minecraft/nbt/StringNbtReader;SQUARE_CLOSE_BRACKET:C
      intermediary field_33268 Lnet/minecraft/class_2522;field_33268:C
      official l Lvq;l:C
    • RIGHT_CURLY_BRACKET

      private static final char RIGHT_CURLY_BRACKET
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named RIGHT_CURLY_BRACKET Lnet/minecraft/nbt/StringNbtReader;RIGHT_CURLY_BRACKET:C
      intermediary field_33269 Lnet/minecraft/class_2522;field_33269:C
      official m Lvq;m:C
    • LEFT_CURLY_BRACKET

      private static final char LEFT_CURLY_BRACKET
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named LEFT_CURLY_BRACKET Lnet/minecraft/nbt/StringNbtReader;LEFT_CURLY_BRACKET:C
      intermediary field_33270 Lnet/minecraft/class_2522;field_33270:C
      official n Lvq;n:C
    • DOUBLE_PATTERN_IMPLICIT

      private static final Pattern DOUBLE_PATTERN_IMPLICIT
      Mappings:
      Namespace Name Mixin selector
      named DOUBLE_PATTERN_IMPLICIT Lnet/minecraft/nbt/StringNbtReader;DOUBLE_PATTERN_IMPLICIT:Ljava/util/regex/Pattern;
      intermediary field_11607 Lnet/minecraft/class_2522;field_11607:Ljava/util/regex/Pattern;
      official o Lvq;o:Ljava/util/regex/Pattern;
    • DOUBLE_PATTERN

      private static final Pattern DOUBLE_PATTERN
      Mappings:
      Namespace Name Mixin selector
      named DOUBLE_PATTERN Lnet/minecraft/nbt/StringNbtReader;DOUBLE_PATTERN:Ljava/util/regex/Pattern;
      intermediary field_11600 Lnet/minecraft/class_2522;field_11600:Ljava/util/regex/Pattern;
      official p Lvq;p:Ljava/util/regex/Pattern;
    • FLOAT_PATTERN

      private static final Pattern FLOAT_PATTERN
      Mappings:
      Namespace Name Mixin selector
      named FLOAT_PATTERN Lnet/minecraft/nbt/StringNbtReader;FLOAT_PATTERN:Ljava/util/regex/Pattern;
      intermediary field_11596 Lnet/minecraft/class_2522;field_11596:Ljava/util/regex/Pattern;
      official q Lvq;q:Ljava/util/regex/Pattern;
    • BYTE_PATTERN

      private static final Pattern BYTE_PATTERN
      Mappings:
      Namespace Name Mixin selector
      named BYTE_PATTERN Lnet/minecraft/nbt/StringNbtReader;BYTE_PATTERN:Ljava/util/regex/Pattern;
      intermediary field_11606 Lnet/minecraft/class_2522;field_11606:Ljava/util/regex/Pattern;
      official r Lvq;r:Ljava/util/regex/Pattern;
    • LONG_PATTERN

      private static final Pattern LONG_PATTERN
      Mappings:
      Namespace Name Mixin selector
      named LONG_PATTERN Lnet/minecraft/nbt/StringNbtReader;LONG_PATTERN:Ljava/util/regex/Pattern;
      intermediary field_11609 Lnet/minecraft/class_2522;field_11609:Ljava/util/regex/Pattern;
      official s Lvq;s:Ljava/util/regex/Pattern;
    • SHORT_PATTERN

      private static final Pattern SHORT_PATTERN
      Mappings:
      Namespace Name Mixin selector
      named SHORT_PATTERN Lnet/minecraft/nbt/StringNbtReader;SHORT_PATTERN:Ljava/util/regex/Pattern;
      intermediary field_11601 Lnet/minecraft/class_2522;field_11601:Ljava/util/regex/Pattern;
      official t Lvq;t:Ljava/util/regex/Pattern;
    • INT_PATTERN

      private static final Pattern INT_PATTERN
      Mappings:
      Namespace Name Mixin selector
      named INT_PATTERN Lnet/minecraft/nbt/StringNbtReader;INT_PATTERN:Ljava/util/regex/Pattern;
      intermediary field_11599 Lnet/minecraft/class_2522;field_11599:Ljava/util/regex/Pattern;
      official u Lvq;u:Ljava/util/regex/Pattern;
    • STRINGIFIED_CODEC

      public static final com.mojang.serialization.Codec<NbtCompound> STRINGIFIED_CODEC
      Mappings:
      Namespace Name Mixin selector
      named STRINGIFIED_CODEC Lnet/minecraft/nbt/StringNbtReader;STRINGIFIED_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_45952 Lnet/minecraft/class_2522;field_45952:Lcom/mojang/serialization/Codec;
      official i Lvq;i:Lcom/mojang/serialization/Codec;
    • NBT_COMPOUND_CODEC

      public static final com.mojang.serialization.Codec<NbtCompound> NBT_COMPOUND_CODEC
      Mappings:
      Namespace Name Mixin selector
      named NBT_COMPOUND_CODEC Lnet/minecraft/nbt/StringNbtReader;NBT_COMPOUND_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51469 Lnet/minecraft/class_2522;field_51469:Lcom/mojang/serialization/Codec;
      official j Lvq;j:Lcom/mojang/serialization/Codec;
    • reader

      private final com.mojang.brigadier.StringReader reader
      Mappings:
      Namespace Name Mixin selector
      named reader Lnet/minecraft/nbt/StringNbtReader;reader:Lcom/mojang/brigadier/StringReader;
      intermediary field_11598 Lnet/minecraft/class_2522;field_11598:Lcom/mojang/brigadier/StringReader;
      official v Lvq;v:Lcom/mojang/brigadier/StringReader;
  • Constructor Details

    • StringNbtReader

      public StringNbtReader(com.mojang.brigadier.StringReader reader)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/nbt/StringNbtReader;<init>(Lcom/mojang/brigadier/StringReader;)V
      intermediary <init> Lnet/minecraft/class_2522;<init>(Lcom/mojang/brigadier/StringReader;)V
      official <init> Lvq;<init>(Lcom/mojang/brigadier/StringReader;)V
  • Method Details

    • parse

      public static NbtCompound parse(String string) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Returns the NBT compound parsed from the string.
      Returns:
      the NBT compound parsed from the string
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException - if the reader detects a syntax error (including trailing strings)
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/nbt/StringNbtReader;parse(Ljava/lang/String;)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_10718 Lnet/minecraft/class_2522;method_10718(Ljava/lang/String;)Lnet/minecraft/class_2487;
      official a Lvq;a(Ljava/lang/String;)Lus;
    • readCompound

      NbtCompound readCompound() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named readCompound Lnet/minecraft/nbt/StringNbtReader;readCompound()Lnet/minecraft/nbt/NbtCompound;
      intermediary method_10721 Lnet/minecraft/class_2522;method_10721()Lnet/minecraft/class_2487;
      official a Lvq;a()Lus;
    • readString

      protected String readString() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named readString Lnet/minecraft/nbt/StringNbtReader;readString()Ljava/lang/String;
      intermediary method_10725 Lnet/minecraft/class_2522;method_10725()Ljava/lang/String;
      official b Lvq;b()Ljava/lang/String;
    • parseElementPrimitive

      protected NbtElement parseElementPrimitive() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parseElementPrimitive Lnet/minecraft/nbt/StringNbtReader;parseElementPrimitive()Lnet/minecraft/nbt/NbtElement;
      intermediary method_10722 Lnet/minecraft/class_2522;method_10722()Lnet/minecraft/class_2520;
      official c Lvq;c()Lvp;
    • parsePrimitive

      private NbtElement parsePrimitive(String input)
      Mappings:
      Namespace Name Mixin selector
      named parsePrimitive Lnet/minecraft/nbt/StringNbtReader;parsePrimitive(Ljava/lang/String;)Lnet/minecraft/nbt/NbtElement;
      intermediary method_10731 Lnet/minecraft/class_2522;method_10731(Ljava/lang/String;)Lnet/minecraft/class_2520;
      official b Lvq;b(Ljava/lang/String;)Lvp;
    • parseElement

      public NbtElement parseElement() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Returns the parsed NBT element.
      Returns:
      the parsed NBT element
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException - if the reader detects a syntax error
      Mappings:
      Namespace Name Mixin selector
      named parseElement Lnet/minecraft/nbt/StringNbtReader;parseElement()Lnet/minecraft/nbt/NbtElement;
      intermediary method_10723 Lnet/minecraft/class_2522;method_10723()Lnet/minecraft/class_2520;
      official d Lvq;d()Lvp;
    • parseArray

      protected NbtElement parseArray() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parseArray Lnet/minecraft/nbt/StringNbtReader;parseArray()Lnet/minecraft/nbt/NbtElement;
      intermediary method_10717 Lnet/minecraft/class_2522;method_10717()Lnet/minecraft/class_2520;
      official e Lvq;e()Lvp;
    • parseCompound

      public NbtCompound parseCompound() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Returns the parsed NBT compound.
      Returns:
      the parsed NBT compound
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException - if the reader detects a syntax error
      Mappings:
      Namespace Name Mixin selector
      named parseCompound Lnet/minecraft/nbt/StringNbtReader;parseCompound()Lnet/minecraft/nbt/NbtCompound;
      intermediary method_10727 Lnet/minecraft/class_2522;method_10727()Lnet/minecraft/class_2487;
      official f Lvq;f()Lus;
    • parseList

      private NbtElement parseList() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parseList Lnet/minecraft/nbt/StringNbtReader;parseList()Lnet/minecraft/nbt/NbtElement;
      intermediary method_10729 Lnet/minecraft/class_2522;method_10729()Lnet/minecraft/class_2520;
      official g Lvq;g()Lvp;
    • parseElementPrimitiveArray

      private NbtElement parseElementPrimitiveArray() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parseElementPrimitiveArray Lnet/minecraft/nbt/StringNbtReader;parseElementPrimitiveArray()Lnet/minecraft/nbt/NbtElement;
      intermediary method_10726 Lnet/minecraft/class_2522;method_10726()Lnet/minecraft/class_2520;
      official h Lvq;h()Lvp;
    • readArray

      private <T extends Number> List<T> readArray(NbtType<?> arrayTypeReader, NbtType<?> typeReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named readArray Lnet/minecraft/nbt/StringNbtReader;readArray(Lnet/minecraft/nbt/NbtType;Lnet/minecraft/nbt/NbtType;)Ljava/util/List;
      intermediary method_10728 Lnet/minecraft/class_2522;method_10728(Lnet/minecraft/class_4614;Lnet/minecraft/class_4614;)Ljava/util/List;
      official a Lvq;a(Lvr;Lvr;)Ljava/util/List;
    • readComma

      private boolean readComma()
      Mappings:
      Namespace Name Mixin selector
      named readComma Lnet/minecraft/nbt/StringNbtReader;readComma()Z
      intermediary method_10716 Lnet/minecraft/class_2522;method_10716()Z
      official i Lvq;i()Z
    • expect

      private void expect(char c) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named expect Lnet/minecraft/nbt/StringNbtReader;expect(C)V
      intermediary method_10719 Lnet/minecraft/class_2522;method_10719(C)V
      official a Lvq;a(C)V