Package net.minecraft.command.arguments
Class FunctionArgument
- java.lang.Object
-
- net.minecraft.command.arguments.FunctionArgument
-
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<FunctionArgument.IResult>
public class FunctionArgument extends java.lang.Object implements com.mojang.brigadier.arguments.ArgumentType<FunctionArgument.IResult>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FunctionArgument.IResult
-
Field Summary
Fields Modifier and Type Field Description private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_UNKNOWN_FUNCTION
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_UNKNOWN_TAG
private static java.util.Collection<java.lang.String>
EXAMPLES
-
Constructor Summary
Constructors Constructor Description FunctionArgument()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FunctionArgument
functions()
java.util.Collection<java.lang.String>
getExamples()
private static FunctionObject
getFunction(com.mojang.brigadier.context.CommandContext<CommandSource> p_218108_0_, ResourceLocation p_218108_1_)
static com.mojang.datafixers.util.Pair<ResourceLocation,com.mojang.datafixers.util.Either<FunctionObject,ITag<FunctionObject>>>
getFunctionOrTag(com.mojang.brigadier.context.CommandContext<CommandSource> p_218110_0_, java.lang.String p_218110_1_)
static java.util.Collection<FunctionObject>
getFunctions(com.mojang.brigadier.context.CommandContext<CommandSource> p_200022_0_, java.lang.String p_200022_1_)
private static ITag<FunctionObject>
getFunctionTag(com.mojang.brigadier.context.CommandContext<CommandSource> p_218111_0_, ResourceLocation p_218111_1_)
FunctionArgument.IResult
parse(com.mojang.brigadier.StringReader p_parse_1_)
-
-
-
Field Detail
-
EXAMPLES
private static final java.util.Collection<java.lang.String> 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
-
-
Method Detail
-
functions
public static FunctionArgument functions()
-
parse
public FunctionArgument.IResult parse(com.mojang.brigadier.StringReader p_parse_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<FunctionArgument.IResult>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunction
private static FunctionObject getFunction(com.mojang.brigadier.context.CommandContext<CommandSource> p_218108_0_, ResourceLocation p_218108_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunctionTag
private static ITag<FunctionObject> getFunctionTag(com.mojang.brigadier.context.CommandContext<CommandSource> p_218111_0_, ResourceLocation p_218111_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFunctions
public static java.util.Collection<FunctionObject> getFunctions(com.mojang.brigadier.context.CommandContext<CommandSource> p_200022_0_, java.lang.String p_200022_1_) 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<FunctionObject,ITag<FunctionObject>>> getFunctionOrTag(com.mojang.brigadier.context.CommandContext<CommandSource> p_218110_0_, java.lang.String p_218110_1_) 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<FunctionArgument.IResult>
-
-