Package net.minecraft.command.arguments
Class NBTPathArgument
- java.lang.Object
-
- net.minecraft.command.arguments.NBTPathArgument
-
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<NBTPathArgument.NBTPath>
public class NBTPathArgument extends java.lang.Object implements com.mojang.brigadier.arguments.ArgumentType<NBTPathArgument.NBTPath>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
NBTPathArgument.CollectionNode
(package private) static class
NBTPathArgument.CompoundNode
(package private) static class
NBTPathArgument.EmptyListNode
(package private) static interface
NBTPathArgument.INode
(package private) static class
NBTPathArgument.JsonNode
(package private) static class
NBTPathArgument.ListNode
static class
NBTPathArgument.NBTPath
(package private) static class
NBTPathArgument.StringNode
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_INVALID_NODE
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_NOTHING_FOUND
private static java.util.Collection<java.lang.String>
EXAMPLES
-
Constructor Summary
Constructors Constructor Description NBTPathArgument()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.function.Predicate<INBT>
createTagPredicate(CompoundNBT p_218080_0_)
java.util.Collection<java.lang.String>
getExamples()
static NBTPathArgument.NBTPath
getPath(com.mojang.brigadier.context.CommandContext<CommandSource> p_197148_0_, java.lang.String p_197148_1_)
private static boolean
isAllowedInUnquotedName(char p_197146_0_)
static NBTPathArgument
nbtPath()
NBTPathArgument.NBTPath
parse(com.mojang.brigadier.StringReader p_parse_1_)
private static NBTPathArgument.INode
parseNode(com.mojang.brigadier.StringReader p_218079_0_, boolean p_218079_1_)
private static NBTPathArgument.INode
readObjectNode(com.mojang.brigadier.StringReader p_218083_0_, java.lang.String p_218083_1_)
private static java.lang.String
readUnquotedName(com.mojang.brigadier.StringReader p_197151_0_)
-
-
-
Field Detail
-
EXAMPLES
private static final java.util.Collection<java.lang.String> EXAMPLES
-
ERROR_INVALID_NODE
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_INVALID_NODE
-
ERROR_NOTHING_FOUND
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NOTHING_FOUND
-
-
Method Detail
-
nbtPath
public static NBTPathArgument nbtPath()
-
getPath
public static NBTPathArgument.NBTPath getPath(com.mojang.brigadier.context.CommandContext<CommandSource> p_197148_0_, java.lang.String p_197148_1_)
-
parse
public NBTPathArgument.NBTPath parse(com.mojang.brigadier.StringReader p_parse_1_) 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.INode parseNode(com.mojang.brigadier.StringReader p_218079_0_, boolean p_218079_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readObjectNode
private static NBTPathArgument.INode readObjectNode(com.mojang.brigadier.StringReader p_218083_0_, java.lang.String p_218083_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readUnquotedName
private static java.lang.String readUnquotedName(com.mojang.brigadier.StringReader p_197151_0_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExamples
public java.util.Collection<java.lang.String> getExamples()
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<NBTPathArgument.NBTPath>
-
isAllowedInUnquotedName
private static boolean isAllowedInUnquotedName(char p_197146_0_)
-
createTagPredicate
private static java.util.function.Predicate<INBT> createTagPredicate(CompoundNBT p_218080_0_)
-
-