Package net.minecraft.commands.arguments
Class NbtPathArgument
java.lang.Object
net.minecraft.commands.arguments.NbtPathArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<NbtPathArgument.NbtPath>
public class NbtPathArgument
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<NbtPathArgument.NbtPath>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
static class
(package private) static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
(package private) static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
(package private) static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final Collection
<String> private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NbtPathArgument.NbtPath
getPath
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pName) private static boolean
isAllowedInUnquotedName
(char pCh) static NbtPathArgument
nbtPath()
parse
(com.mojang.brigadier.StringReader pReader) private static NbtPathArgument.Node
parseNode
(com.mojang.brigadier.StringReader pReader, boolean pFirst) private static NbtPathArgument.Node
readObjectNode
(com.mojang.brigadier.StringReader pReader, String pName) private static String
readUnquotedName
(com.mojang.brigadier.StringReader pReader) Reads a tag name until the next special character.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mojang.brigadier.arguments.ArgumentType
listSuggestions, parse
-
Field Details
-
EXAMPLES
-
ERROR_INVALID_NODE
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_INVALID_NODE -
ERROR_DATA_TOO_DEEP
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_DATA_TOO_DEEP -
ERROR_NOTHING_FOUND
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NOTHING_FOUND -
ERROR_EXPECTED_LIST
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_EXPECTED_LIST -
ERROR_INVALID_INDEX
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_INDEX -
INDEX_MATCH_START
private static final char INDEX_MATCH_START- See Also:
-
INDEX_MATCH_END
private static final char INDEX_MATCH_END- See Also:
-
KEY_MATCH_START
private static final char KEY_MATCH_START- See Also:
-
KEY_MATCH_END
private static final char KEY_MATCH_END- See Also:
-
QUOTED_KEY_START
private static final char QUOTED_KEY_START- See Also:
-
SINGLE_QUOTED_KEY_START
private static final char SINGLE_QUOTED_KEY_START- See Also:
-
-
Constructor Details
-
NbtPathArgument
public NbtPathArgument()
-
-
Method Details
-
nbtPath
-
getPath
public static NbtPathArgument.NbtPath getPath(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pName) -
parse
public NbtPathArgument.NbtPath parse(com.mojang.brigadier.StringReader pReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<NbtPathArgument.NbtPath>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseNode
private static NbtPathArgument.Node parseNode(com.mojang.brigadier.StringReader pReader, boolean pFirst) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readObjectNode
private static NbtPathArgument.Node readObjectNode(com.mojang.brigadier.StringReader pReader, String pName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readUnquotedName
private static String readUnquotedName(com.mojang.brigadier.StringReader pReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException Reads a tag name until the next special character. Throws if the result would be a 0-length string. Does not handle quoted tag names.- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<NbtPathArgument.NbtPath>
-
isAllowedInUnquotedName
private static boolean isAllowedInUnquotedName(char pCh) - Returns:
true
if the given character is normal for a tag name; otherwisefalse
if it has special meaning for paths.
-
createTagPredicate
-