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
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final Collection<String>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FunctionArgument
(package private) static CommandFunction
getFunction
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120929_, ResourceLocation p_120930_) static com.mojang.datafixers.util.Pair<ResourceLocation,
com.mojang.datafixers.util.Either<CommandFunction, Tag<CommandFunction>>> getFunctionOrTag
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120921_, String p_120922_) static Collection<CommandFunction>
getFunctions
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120911_, String p_120912_) (package private) static Tag<CommandFunction>
getFunctionTag
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120932_, ResourceLocation p_120933_) parse
(com.mojang.brigadier.StringReader p_120909_) 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
-
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 p_120909_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<FunctionArgument.Result>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunction
static CommandFunction getFunction(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120929_, ResourceLocation p_120930_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunctionTag
static Tag<CommandFunction> getFunctionTag(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120932_, ResourceLocation p_120933_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunctions
public static Collection<CommandFunction> getFunctions(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120911_, String p_120912_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunctionOrTag
public static com.mojang.datafixers.util.Pair<ResourceLocation,com.mojang.datafixers.util.Either<CommandFunction, getFunctionOrTagTag<CommandFunction>>> (com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120921_, String p_120922_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<FunctionArgument.Result>
-