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 ik
  • 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 Lik;a()Lalz;
    • 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 Lik;a(Lux;Lcom/mojang/brigadier/CommandDispatcher;)Lim;
    • 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 Lik;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 Lik;a(Lalz;Lcom/mojang/brigadier/CommandDispatcher;Ley;Ljava/util/List;)Lik;
    • 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 Lik;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 Lik;a(Lcom/mojang/brigadier/CommandDispatcher;Ley;Lcom/mojang/brigadier/StringReader;)Lia;