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>
  • Field Details

    • EXAMPLES

      private static final Collection<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
  • Constructor Details

    • FunctionArgument

      public FunctionArgument()
  • Method Details

    • functions

      public static FunctionArgument functions()
    • parse

      public FunctionArgument.Result parse(com.mojang.brigadier.StringReader p_120909_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.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,​Tag<CommandFunction>>> getFunctionOrTag(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_120921_, String p_120922_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<FunctionArgument.Result>