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