Package net.minecraft.nbt
Class SnbtGrammar
java.lang.Object
net.minecraft.nbt.SnbtGrammar
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enum(package private) static enum(package private) static final record(package private) static final record(package private) static enum(package private) static final record(package private) static enum(package private) static class(package private) static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final NumberRunParseRuleprivate static final NumberRunParseRuleprivate static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> (package private) static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> (package private) static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> (package private) static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> (package private) static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> private static final HexFormatprivate static final NumberRunParseRuleprivate static final StringReaderTerms.TerminalCharactersprivate static final GreedyPredicateParseRuleprivate static final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static booleancanStartNumber(char pC) private static voidcleanAndAppend(StringBuilder pStringBuilder, String pText) (package private) static voidcleanAndAppend(StringBuilder pStringBuilder, String pText, boolean pRemoveUnderscores) private static <T> TconvertDouble(com.mojang.serialization.DynamicOps<T> pOps, ParseState<?> pParseState, String pValue) private static <T> TconvertFloat(com.mojang.serialization.DynamicOps<T> pOps, ParseState<?> pParseState, String pValue) private static <T> TcreateFloat(com.mojang.serialization.DynamicOps<T> pOps, SnbtGrammar.Sign pSign, String pWholePart, String pFractionPart, SnbtGrammar.Signed<String> pExponentPart, SnbtGrammar.TypeSuffix pSuffix, ParseState<?> pParseState) (package private) static DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> createNumberParseError(NumberFormatException pNumberFormatException) static <T> Grammar<T> createParser(com.mojang.serialization.DynamicOps<T> pOps) static StringescapeControlCharacters(char pC) private static booleanisAllowedToStartUnquotedString(char pC) private static String(package private) static booleanneedsUnderscoreRemoval(String pText) (package private) static shortparseUnsignedShort(String pText, int pRadix)
-
Field Details
-
ERROR_NUMBER_PARSE_FAILURE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NUMBER_PARSE_FAILURE -
ERROR_EXPECTED_HEX_ESCAPE
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_EXPECTED_HEX_ESCAPE -
ERROR_INVALID_CODEPOINT
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_CODEPOINT -
ERROR_NO_SUCH_OPERATION
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NO_SUCH_OPERATION -
ERROR_EXPECTED_INTEGER_TYPE
static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_EXPECTED_INTEGER_TYPE -
ERROR_EXPECTED_FLOAT_TYPE
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_EXPECTED_FLOAT_TYPE -
ERROR_EXPECTED_NON_NEGATIVE_NUMBER
static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_EXPECTED_NON_NEGATIVE_NUMBER -
ERROR_INVALID_CHARACTER_NAME
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_INVALID_CHARACTER_NAME -
ERROR_INVALID_ARRAY_ELEMENT_TYPE
static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_INVALID_ARRAY_ELEMENT_TYPE -
ERROR_INVALID_UNQUOTED_START
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_INVALID_UNQUOTED_START -
ERROR_EXPECTED_UNQUOTED_STRING
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_EXPECTED_UNQUOTED_STRING -
ERROR_INVALID_STRING_CONTENTS
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_INVALID_STRING_CONTENTS -
ERROR_EXPECTED_BINARY_NUMERAL
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_EXPECTED_BINARY_NUMERAL -
ERROR_UNDESCORE_NOT_ALLOWED
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_UNDESCORE_NOT_ALLOWED -
ERROR_EXPECTED_DECIMAL_NUMERAL
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_EXPECTED_DECIMAL_NUMERAL -
ERROR_EXPECTED_HEX_NUMERAL
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_EXPECTED_HEX_NUMERAL -
ERROR_EMPTY_KEY
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_EMPTY_KEY -
ERROR_LEADING_ZERO_NOT_ALLOWED
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_LEADING_ZERO_NOT_ALLOWED -
ERROR_INFINITY_NOT_ALLOWED
private static final DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> ERROR_INFINITY_NOT_ALLOWED -
HEX_ESCAPE
-
BINARY_NUMERAL
-
DECIMAL_NUMERAL
-
HEX_NUMERAL
-
PLAIN_STRING_CHUNK
-
NUMBER_LOOKEAHEAD
-
UNICODE_NAME
-
-
Constructor Details
-
SnbtGrammar
public SnbtGrammar()
-
-
Method Details
-
createNumberParseError
static DelayedException<com.mojang.brigadier.exceptions.CommandSyntaxException> createNumberParseError(NumberFormatException pNumberFormatException) -
escapeControlCharacters
-
isAllowedToStartUnquotedString
private static boolean isAllowedToStartUnquotedString(char pC) -
canStartNumber
static boolean canStartNumber(char pC) -
needsUnderscoreRemoval
-
cleanAndAppend
-
cleanAndAppend
-
parseUnsignedShort
-
createFloat
@Nullable private static <T> T createFloat(com.mojang.serialization.DynamicOps<T> pOps, SnbtGrammar.Sign pSign, @Nullable String pWholePart, @Nullable String pFractionPart, @Nullable SnbtGrammar.Signed<String> pExponentPart, @Nullable SnbtGrammar.TypeSuffix pSuffix, ParseState<?> pParseState) -
convertFloat
@Nullable private static <T> T convertFloat(com.mojang.serialization.DynamicOps<T> pOps, ParseState<?> pParseState, String pValue) -
convertDouble
@Nullable private static <T> T convertDouble(com.mojang.serialization.DynamicOps<T> pOps, ParseState<?> pParseState, String pValue) -
joinList
-
createParser
-