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
<CommandSourceStack> getFunction
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120929_, ResourceLocation p_120930_) static com.mojang.datafixers.util.Pair
<ResourceLocation, Collection<CommandFunction<CommandSourceStack>>> getFunctionCollection
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_314719_, String p_314716_) static com.mojang.datafixers.util.Pair
<ResourceLocation, com.mojang.datafixers.util.Either<CommandFunction<CommandSourceStack>, Collection<CommandFunction<CommandSourceStack>>>> getFunctionOrTag
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120921_, String p_120922_) static Collection
<CommandFunction<CommandSourceStack>> getFunctions
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120911_, String p_120912_) (package private) static Collection
<CommandFunction<CommandSourceStack>> getFunctionTag
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_235274_, ResourceLocation p_235275_) 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<CommandSourceStack> 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 Collection<CommandFunction<CommandSourceStack>> getFunctionTag(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_235274_, ResourceLocation p_235275_) 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> 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<CommandSourceStack>, getFunctionOrTagCollection<CommandFunction<CommandSourceStack>>>> (com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120921_, String p_120922_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunctionCollection
public static com.mojang.datafixers.util.Pair<ResourceLocation,Collection<CommandFunction<CommandSourceStack>>> getFunctionCollection(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_314719_, String p_314716_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<FunctionArgument.Result>
-