Class FunctionArgument
java.lang.Object
net.minecraft.commands.arguments.item.FunctionArgument
- All Implemented Interfaces:
ArgumentType<FunctionArgument.Result>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DynamicCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final Collection<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FunctionArgumentprivate static CommandFunction<CommandSourceStack> static Pair<Identifier, Collection<CommandFunction<CommandSourceStack>>> getFunctionCollection(CommandContext<CommandSourceStack> context, String name) static Pair<Identifier, Either<CommandFunction<CommandSourceStack>, Collection<CommandFunction<CommandSourceStack>>>> getFunctionOrTag(CommandContext<CommandSourceStack> context, String name) static Collection<CommandFunction<CommandSourceStack>> getFunctions(CommandContext<CommandSourceStack> context, String name) private static Collection<CommandFunction<CommandSourceStack>> parse(StringReader reader) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArgumentType
listSuggestions, parse
-
Field Details
-
EXAMPLES
-
ERROR_UNKNOWN_TAG
-
ERROR_UNKNOWN_FUNCTION
-
-
Constructor Details
-
FunctionArgument
public FunctionArgument()
-
-
Method Details
-
functions
-
parse
- Specified by:
parsein interfaceArgumentType<FunctionArgument.Result>- Throws:
CommandSyntaxException
-
getFunction
private static CommandFunction<CommandSourceStack> getFunction(CommandContext<CommandSourceStack> c, Identifier id) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getFunctionTag
private static Collection<CommandFunction<CommandSourceStack>> getFunctionTag(CommandContext<CommandSourceStack> c, Identifier id) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getFunctions
public static Collection<CommandFunction<CommandSourceStack>> getFunctions(CommandContext<CommandSourceStack> context, String name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getFunctionOrTag
public static Pair<Identifier, Either<CommandFunction<CommandSourceStack>, Collection<CommandFunction<CommandSourceStack>>>> getFunctionOrTag(CommandContext<CommandSourceStack> context, String name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getFunctionCollection
public static Pair<Identifier, Collection<CommandFunction<CommandSourceStack>>> getFunctionCollection(CommandContext<CommandSourceStack> context, String name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getExamples
- Specified by:
getExamplesin interfaceArgumentType<FunctionArgument.Result>
-