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 classNbtPathArgumentType.AllListElementNode(package private) static classNbtPathArgumentType.FilteredListElementNode(package private) static classNbtPathArgumentType.FilteredNamedNode(package private) static classNbtPathArgumentType.FilteredRootNode(package private) static classNbtPathArgumentType.IndexedListElementNode(package private) static classNbtPathArgumentType.NamedNodestatic classNbtPathArgumentType.NbtPath(package private) static interfaceNbtPathArgumentType.PathNode -
Field Summary
Fields Modifier and Type Field Description private static Collection<String>EXAMPLESstatic com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeINVALID_PATH_NODE_EXCEPTIONstatic com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeNOTHING_FOUND_EXCEPTION -
Constructor Summary
Constructors Constructor Description NbtPathArgumentType() -
Method Summary
Modifier and Type Method Description Collection<String>getExamples()static NbtPathArgumentType.NbtPathgetNbtPath(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)private static Predicate<Tag>getPredicate(CompoundTag filter)private static booleanisNameCharacter(char c)static NbtPathArgumentTypenbtPath()NbtPathArgumentType.NbtPathparse(com.mojang.brigadier.StringReader stringReader)private static NbtPathArgumentType.PathNodeparseNode(com.mojang.brigadier.StringReader reader, boolean root)private static NbtPathArgumentType.PathNodereadCompoundChildNode(com.mojang.brigadier.StringReader reader, String name)private static StringreadName(com.mojang.brigadier.StringReader reader)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
parsein 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:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>
-
isNameCharacter
private static boolean isNameCharacter(char c) -
getPredicate
-