Interface CommandFunction<T>

All Known Implementing Classes:
ExpandedMacro, Macro

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

    • id

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

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

      private static boolean continuesToNextLine(CharSequence string)
      Mappings:
      Namespace Name Mixin selector
      official a Lhb;a(Ljava/lang/CharSequence;)Z
      intermediary method_52592 Lnet/minecraft/class_2158;method_52592(Ljava/lang/CharSequence;)Z
      named continuesToNextLine Lnet/minecraft/server/function/CommandFunction;continuesToNextLine(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
      official a Lhb;a(Lahg;Lcom/mojang/brigadier/CommandDispatcher;Ldu;Ljava/util/List;)Lhb;
      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;
      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;
    • 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
      official a Lhb;a(Lcom/mojang/brigadier/CommandDispatcher;Ldu;Lcom/mojang/brigadier/StringReader;)Lgs;
      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;
      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;