Package net.minecraft.command.argument
Class NbtPathArgumentType
java.lang.Object
net.minecraft.command.argument.NbtPathArgumentType
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>
public class NbtPathArgumentType extends Object implements com.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
NbtPathArgumentType.AllListElementNode
(package private) static class
NbtPathArgumentType.FilteredListElementNode
(package private) static class
NbtPathArgumentType.FilteredNamedNode
(package private) static class
NbtPathArgumentType.FilteredRootNode
(package private) static class
NbtPathArgumentType.IndexedListElementNode
(package private) static class
NbtPathArgumentType.NamedNode
static class
NbtPathArgumentType.NbtPath
(package private) static interface
NbtPathArgumentType.PathNode
-
Field Summary
Fields Modifier and Type Field Description private static Collection<String>
EXAMPLES
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
INVALID_PATH_NODE_EXCEPTION
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
NOTHING_FOUND_EXCEPTION
-
Constructor Summary
Constructors Constructor Description NbtPathArgumentType()
-
Method Summary
Modifier and Type Method Description Collection<String>
getExamples()
static NbtPathArgumentType.NbtPath
getNbtPath(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
private static Predicate<Tag>
getPredicate(CompoundTag filter)
private static boolean
isNameCharacter(char c)
static NbtPathArgumentType
nbtPath()
NbtPathArgumentType.NbtPath
parse(com.mojang.brigadier.StringReader stringReader)
private static NbtPathArgumentType.PathNode
parseNode(com.mojang.brigadier.StringReader reader, boolean root)
private static NbtPathArgumentType.PathNode
readCompoundChildNode(com.mojang.brigadier.StringReader reader, String name)
private static String
readName(com.mojang.brigadier.StringReader reader)
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
-
Field Details
-
EXAMPLES
-
INVALID_PATH_NODE_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_PATH_NODE_EXCEPTION -
NOTHING_FOUND_EXCEPTION
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType NOTHING_FOUND_EXCEPTION
-
-
Constructor Details
-
NbtPathArgumentType
public NbtPathArgumentType()
-
-
Method Details
-
nbtPath
-
getNbtPath
public static NbtPathArgumentType.NbtPath getNbtPath(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) -
parse
public NbtPathArgumentType.NbtPath parse(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseNode
private static NbtPathArgumentType.PathNode parseNode(com.mojang.brigadier.StringReader reader, boolean root) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readCompoundChildNode
private static NbtPathArgumentType.PathNode readCompoundChildNode(com.mojang.brigadier.StringReader reader, String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readName
private static String readName(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>
-
isNameCharacter
private static boolean isNameCharacter(char c) -
getPredicate
-