Package net.minecraft.nbt
Class JsonToNBT
- java.lang.Object
-
- net.minecraft.nbt.JsonToNBT
-
public class JsonToNBT extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.Pattern
BYTE_PATTERN
private static java.util.regex.Pattern
DOUBLE_PATTERN
private static java.util.regex.Pattern
DOUBLE_PATTERN_NOSUFFIX
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_EXPECTED_KEY
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_EXPECTED_VALUE
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
ERROR_INSERT_MIXED_ARRAY
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
ERROR_INSERT_MIXED_LIST
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_INVALID_ARRAY
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_TRAILING_DATA
private static java.util.regex.Pattern
FLOAT_PATTERN
private static java.util.regex.Pattern
INT_PATTERN
private static java.util.regex.Pattern
LONG_PATTERN
private com.mojang.brigadier.StringReader
reader
private static java.util.regex.Pattern
SHORT_PATTERN
-
Constructor Summary
Constructors Constructor Description JsonToNBT(com.mojang.brigadier.StringReader p_i47948_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
expect(char p_193604_1_)
private boolean
hasElementSeparator()
static CompoundNBT
parseTag(java.lang.String p_180713_0_)
private <T extends java.lang.Number>
java.util.List<T>readArray(INBTType<?> p_229706_1_, INBTType<?> p_229706_2_)
private INBT
readArrayTag()
protected java.lang.String
readKey()
protected INBT
readList()
private INBT
readListTag()
(package private) CompoundNBT
readSingleStruct()
CompoundNBT
readStruct()
protected INBT
readTypedValue()
INBT
readValue()
private INBT
type(java.lang.String p_193596_1_)
-
-
-
Field Detail
-
ERROR_TRAILING_DATA
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_TRAILING_DATA
-
ERROR_EXPECTED_KEY
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_EXPECTED_KEY
-
ERROR_EXPECTED_VALUE
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_EXPECTED_VALUE
-
ERROR_INSERT_MIXED_LIST
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_INSERT_MIXED_LIST
-
ERROR_INSERT_MIXED_ARRAY
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_INSERT_MIXED_ARRAY
-
ERROR_INVALID_ARRAY
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_ARRAY
-
DOUBLE_PATTERN_NOSUFFIX
private static final java.util.regex.Pattern DOUBLE_PATTERN_NOSUFFIX
-
DOUBLE_PATTERN
private static final java.util.regex.Pattern DOUBLE_PATTERN
-
FLOAT_PATTERN
private static final java.util.regex.Pattern FLOAT_PATTERN
-
BYTE_PATTERN
private static final java.util.regex.Pattern BYTE_PATTERN
-
LONG_PATTERN
private static final java.util.regex.Pattern LONG_PATTERN
-
SHORT_PATTERN
private static final java.util.regex.Pattern SHORT_PATTERN
-
INT_PATTERN
private static final java.util.regex.Pattern INT_PATTERN
-
reader
private final com.mojang.brigadier.StringReader reader
-
-
Method Detail
-
parseTag
public static CompoundNBT parseTag(java.lang.String p_180713_0_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readSingleStruct
CompoundNBT readSingleStruct() throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readKey
protected java.lang.String readKey() throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readTypedValue
protected INBT readTypedValue() throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
type
private INBT type(java.lang.String p_193596_1_)
-
readValue
public INBT readValue() throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readList
protected INBT readList() throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readStruct
public CompoundNBT readStruct() throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readListTag
private INBT readListTag() throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readArrayTag
private INBT readArrayTag() throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readArray
private <T extends java.lang.Number> java.util.List<T> readArray(INBTType<?> p_229706_1_, INBTType<?> p_229706_2_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
hasElementSeparator
private boolean hasElementSeparator()
-
expect
private void expect(char p_193604_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
-