Package net.minecraft.nbt
Class StringNbtReader
java.lang.Object
net.minecraft.nbt.StringNbtReader
public class StringNbtReader extends Object
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeARRAY_INVALIDstatic com.mojang.brigadier.exceptions.Dynamic2CommandExceptionTypeARRAY_MIXEDprivate static PatternBYTE_PATTERNprivate static PatternDOUBLE_PATTERNprivate static PatternDOUBLE_PATTERN_IMPLICITstatic com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeEXPECTED_KEYstatic com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeEXPECTED_VALUEprivate static PatternFLOAT_PATTERNprivate static PatternINT_PATTERNstatic com.mojang.brigadier.exceptions.Dynamic2CommandExceptionTypeLIST_MIXEDprivate static PatternLONG_PATTERNprivate com.mojang.brigadier.StringReaderreaderprivate static PatternSHORT_PATTERNstatic com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeTRAILING -
Constructor Summary
Constructors Constructor Description StringNbtReader(com.mojang.brigadier.StringReader reader) -
Method Summary
Modifier and Type Method Description private voidexpect(char char2)static NbtCompoundparse(String string)protected NbtElementparseArray()NbtCompoundparseCompound()NbtElementparseElement()protected NbtElementparseElementPrimitive()private NbtElementparseElementPrimitiveArray()private NbtElementparseList()private NbtElementparsePrimitive(String input)private <T extends Number>
List<T>readArray(NbtType<?> arrayTypeReader, NbtType<?> typeReader)private booleanreadComma()(package private) NbtCompoundreadCompound()protected StringreadString()
-
Field Details
-
TRAILING
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType TRAILING -
EXPECTED_KEY
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXPECTED_KEY -
EXPECTED_VALUE
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXPECTED_VALUE -
LIST_MIXED
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType LIST_MIXED -
ARRAY_MIXED
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ARRAY_MIXED -
ARRAY_INVALID
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ARRAY_INVALID -
DOUBLE_PATTERN_IMPLICIT
-
DOUBLE_PATTERN
-
FLOAT_PATTERN
-
BYTE_PATTERN
-
LONG_PATTERN
-
SHORT_PATTERN
-
INT_PATTERN
-
reader
private final com.mojang.brigadier.StringReader reader
-
-
Constructor Details
-
StringNbtReader
public StringNbtReader(com.mojang.brigadier.StringReader reader)
-
-
Method Details
-
parse
public static NbtCompound parse(String string) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readCompound
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readString
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseElementPrimitive
protected NbtElement parseElementPrimitive() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parsePrimitive
-
parseElement
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseArray
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseCompound
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseList
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseElementPrimitiveArray
private NbtElement parseElementPrimitiveArray() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readArray
-
readComma
private boolean readComma() -
expect
private void expect(char char2) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-