Interface CommandFunction<T>

All Known Implementing Classes:
ExpandedMacro, Macro

public interface CommandFunction<T>
Mappings:
Namespace Name
named net/minecraft/server/function/CommandFunction
intermediary net/minecraft/class_2158
official ic
  • Method Details

    • id

      Mappings:
      Namespace Name Mixin selector
      named id Lnet/minecraft/server/function/CommandFunction;id()Lnet/minecraft/util/Identifier;
      intermediary comp_1994 Lnet/minecraft/class_2158;comp_1994()Lnet/minecraft/class_2960;
      official a Lic;a()Lakk;
    • withMacroReplaced

      Procedure<T> withMacroReplaced(@Nullable @Nullable NbtCompound arguments, com.mojang.brigadier.CommandDispatcher<T> dispatcher) throws MacroException
      Throws:
      MacroException
      Mappings:
      Namespace Name Mixin selector
      named withMacroReplaced Lnet/minecraft/server/function/CommandFunction;withMacroReplaced(Lnet/minecraft/nbt/NbtCompound;Lcom/mojang/brigadier/CommandDispatcher;)Lnet/minecraft/server/function/Procedure;
      intermediary method_52595 Lnet/minecraft/class_2158;method_52595(Lnet/minecraft/class_2487;Lcom/mojang/brigadier/CommandDispatcher;)Lnet/minecraft/class_8868;
      official a Lic;a(Ltx;Lcom/mojang/brigadier/CommandDispatcher;)Lie;
    • continuesToNextLine

      private static boolean continuesToNextLine(CharSequence string)
      Mappings:
      Namespace Name Mixin selector
      named continuesToNextLine Lnet/minecraft/server/function/CommandFunction;continuesToNextLine(Ljava/lang/CharSequence;)Z
      intermediary method_52592 Lnet/minecraft/class_2158;method_52592(Ljava/lang/CharSequence;)Z
      official b Lic;b(Ljava/lang/CharSequence;)Z
    • create

      static <T extends AbstractServerCommandSource<T>> CommandFunction<T> create(Identifier id, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, List<String> lines)
      Parses a function in the context of source.

      Any syntax errors, such as improper comment lines or unknown commands, will be thrown at this point.

      Parameters:
      lines - the raw lines (including comments) read from a function file
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/server/function/CommandFunction;create(Lnet/minecraft/util/Identifier;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/server/command/AbstractServerCommandSource;Ljava/util/List;)Lnet/minecraft/server/function/CommandFunction;
      intermediary method_9195 Lnet/minecraft/class_2158;method_9195(Lnet/minecraft/class_2960;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/class_8839;Ljava/util/List;)Lnet/minecraft/class_2158;
      official a Lic;a(Lakk;Lcom/mojang/brigadier/CommandDispatcher;Les;Ljava/util/List;)Lic;
    • validateCommandLength

      static void validateCommandLength(CharSequence command)
      Mappings:
      Namespace Name Mixin selector
      named validateCommandLength Lnet/minecraft/server/function/CommandFunction;validateCommandLength(Ljava/lang/CharSequence;)V
      intermediary method_57057 Lnet/minecraft/class_2158;method_57057(Ljava/lang/CharSequence;)V
      official a Lic;a(Ljava/lang/CharSequence;)V
    • parse

      static <T extends AbstractServerCommandSource<T>> SourcedCommandAction<T> parse(com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/server/function/CommandFunction;parse(Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/server/command/AbstractServerCommandSource;Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/command/SourcedCommandAction;
      intermediary method_54417 Lnet/minecraft/class_2158;method_54417(Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/class_8839;Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_8856;
      official a Lic;a(Lcom/mojang/brigadier/CommandDispatcher;Les;Lcom/mojang/brigadier/StringReader;)Lht;