Class CommandFunctionManager

java.lang.Object
net.minecraft.server.function.CommandFunctionManager

public class CommandFunctionManager extends Object
The command function manager implements execution of functions, like that from the function command.
Mappings:
Namespace Name
named net/minecraft/server/function/CommandFunctionManager
intermediary net/minecraft/class_2991
official alf
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/server/function/CommandFunctionManager;LOGGER:Lorg/slf4j/Logger;
      intermediary field_47181 Lnet/minecraft/class_2991;field_47181:Lorg/slf4j/Logger;
      official a Lalf;a:Lorg/slf4j/Logger;
    • TICK_TAG_ID

      private static final Identifier TICK_TAG_ID
      Mappings:
      Namespace Name Mixin selector
      named TICK_TAG_ID Lnet/minecraft/server/function/CommandFunctionManager;TICK_TAG_ID:Lnet/minecraft/util/Identifier;
      intermediary field_13417 Lnet/minecraft/class_2991;field_13417:Lnet/minecraft/class_2960;
      official b Lalf;b:Lakq;
    • LOAD_TAG_ID

      private static final Identifier LOAD_TAG_ID
      Mappings:
      Namespace Name Mixin selector
      named LOAD_TAG_ID Lnet/minecraft/server/function/CommandFunctionManager;LOAD_TAG_ID:Lnet/minecraft/util/Identifier;
      intermediary field_13412 Lnet/minecraft/class_2991;field_13412:Lnet/minecraft/class_2960;
      official c Lalf;c:Lakq;
    • server

      private final MinecraftServer server
      Mappings:
      Namespace Name Mixin selector
      named server Lnet/minecraft/server/function/CommandFunctionManager;server:Lnet/minecraft/server/MinecraftServer;
      intermediary field_13419 Lnet/minecraft/class_2991;field_13419:Lnet/minecraft/server/MinecraftServer;
      official d Lalf;d:Lnet/minecraft/server/MinecraftServer;
    • tickFunctions

      private List<CommandFunction<ServerCommandSource>> tickFunctions
      A list of minecraft:tick tag functions to run on every tick. Set up on load, this is more efficient than polling the tag from the loader every tick.
      Mappings:
      Namespace Name Mixin selector
      named tickFunctions Lnet/minecraft/server/function/CommandFunctionManager;tickFunctions:Ljava/util/List;
      intermediary field_13418 Lnet/minecraft/class_2991;field_13418:Ljava/util/List;
      official e Lalf;e:Ljava/util/List;
    • justLoaded

      private boolean justLoaded
      Whether this command function manager has just loaded and should run all functions in the minecraft:load function tag.
      Mappings:
      Namespace Name Mixin selector
      named justLoaded Lnet/minecraft/server/function/CommandFunctionManager;justLoaded:Z
      intermediary field_13422 Lnet/minecraft/class_2991;field_13422:Z
      official f Lalf;f:Z
    • loader

      private FunctionLoader loader
      The source of functions for this command function manager.
      Mappings:
      Namespace Name Mixin selector
      named loader Lnet/minecraft/server/function/CommandFunctionManager;loader:Lnet/minecraft/server/function/FunctionLoader;
      intermediary field_25333 Lnet/minecraft/class_2991;field_25333:Lnet/minecraft/class_5349;
      official g Lalf;g:Lale;
  • Constructor Details

    • CommandFunctionManager

      public CommandFunctionManager(MinecraftServer server, FunctionLoader loader)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/server/function/CommandFunctionManager;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/server/function/FunctionLoader;)V
      intermediary <init> Lnet/minecraft/class_2991;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/class_5349;)V
      official <init> Lalf;<init>(Lnet/minecraft/server/MinecraftServer;Lale;)V
  • Method Details

    • getDispatcher

      public com.mojang.brigadier.CommandDispatcher<ServerCommandSource> getDispatcher()
      Mappings:
      Namespace Name Mixin selector
      named getDispatcher Lnet/minecraft/server/function/CommandFunctionManager;getDispatcher()Lcom/mojang/brigadier/CommandDispatcher;
      intermediary method_12900 Lnet/minecraft/class_2991;method_12900()Lcom/mojang/brigadier/CommandDispatcher;
      official a Lalf;a()Lcom/mojang/brigadier/CommandDispatcher;
    • tick

      public void tick()
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/server/function/CommandFunctionManager;tick()V
      intermediary method_18699 Lnet/minecraft/class_2991;method_18699()V
      official b Lalf;b()V
    • executeAll

      private void executeAll(Collection<CommandFunction<ServerCommandSource>> functions, Identifier label)
      Mappings:
      Namespace Name Mixin selector
      named executeAll Lnet/minecraft/server/function/CommandFunctionManager;executeAll(Ljava/util/Collection;Lnet/minecraft/util/Identifier;)V
      intermediary method_29460 Lnet/minecraft/class_2991;method_29460(Ljava/util/Collection;Lnet/minecraft/class_2960;)V
      official a Lalf;a(Ljava/util/Collection;Lakq;)V
    • execute

      public void execute(CommandFunction<ServerCommandSource> function, ServerCommandSource source)
      Executes a function.
      Parameters:
      function - the function
      Mappings:
      Namespace Name Mixin selector
      named execute Lnet/minecraft/server/function/CommandFunctionManager;execute(Lnet/minecraft/server/function/CommandFunction;Lnet/minecraft/server/command/ServerCommandSource;)V
      intermediary method_12904 Lnet/minecraft/class_2991;method_12904(Lnet/minecraft/class_2158;Lnet/minecraft/class_2168;)V
      official a Lalf;a(Lig;Let;)V
    • setFunctions

      public void setFunctions(FunctionLoader loader)
      Sets the functions that this command function manager will use in executions.
      Parameters:
      loader - the new loader functions will be taken from
      Mappings:
      Namespace Name Mixin selector
      named setFunctions Lnet/minecraft/server/function/CommandFunctionManager;setFunctions(Lnet/minecraft/server/function/FunctionLoader;)V
      intermediary method_29461 Lnet/minecraft/class_2991;method_29461(Lnet/minecraft/class_5349;)V
      official a Lalf;a(Lale;)V
    • load

      private void load(FunctionLoader loader)
      Mappings:
      Namespace Name Mixin selector
      named load Lnet/minecraft/server/function/CommandFunctionManager;load(Lnet/minecraft/server/function/FunctionLoader;)V
      intermediary method_29773 Lnet/minecraft/class_2991;method_29773(Lnet/minecraft/class_5349;)V
      official b Lalf;b(Lale;)V
    • getScheduledCommandSource

      public ServerCommandSource getScheduledCommandSource()
      Returns the command source to execute scheduled functions. Scheduled functions are those from the /schedule command and those from the minecraft:tick tag.

      This command source has permission level 2 and is silent compared to the server's command source.

      Returns:
      the command source to execute scheduled functions
      Mappings:
      Namespace Name Mixin selector
      named getScheduledCommandSource Lnet/minecraft/server/function/CommandFunctionManager;getScheduledCommandSource()Lnet/minecraft/server/command/ServerCommandSource;
      intermediary method_12899 Lnet/minecraft/class_2991;method_12899()Lnet/minecraft/class_2168;
      official c Lalf;c()Let;
    • getFunction

      Mappings:
      Namespace Name Mixin selector
      named getFunction Lnet/minecraft/server/function/CommandFunctionManager;getFunction(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
      intermediary method_12905 Lnet/minecraft/class_2991;method_12905(Lnet/minecraft/class_2960;)Ljava/util/Optional;
      official a Lalf;a(Lakq;)Ljava/util/Optional;
    • getTag

      Mappings:
      Namespace Name Mixin selector
      named getTag Lnet/minecraft/server/function/CommandFunctionManager;getTag(Lnet/minecraft/util/Identifier;)Ljava/util/Collection;
      intermediary method_29462 Lnet/minecraft/class_2991;method_29462(Lnet/minecraft/class_2960;)Ljava/util/Collection;
      official b Lalf;b(Lakq;)Ljava/util/Collection;
    • getAllFunctions

      public Iterable<Identifier> getAllFunctions()
      Mappings:
      Namespace Name Mixin selector
      named getAllFunctions Lnet/minecraft/server/function/CommandFunctionManager;getAllFunctions()Ljava/lang/Iterable;
      intermediary method_29463 Lnet/minecraft/class_2991;method_29463()Ljava/lang/Iterable;
      official d Lalf;d()Ljava/lang/Iterable;
    • getFunctionTags

      public Iterable<Identifier> getFunctionTags()
      Mappings:
      Namespace Name Mixin selector
      named getFunctionTags Lnet/minecraft/server/function/CommandFunctionManager;getFunctionTags()Ljava/lang/Iterable;
      intermediary method_29464 Lnet/minecraft/class_2991;method_29464()Ljava/lang/Iterable;
      official e Lalf;e()Ljava/lang/Iterable;