2019-06-28 17:55:20 -04:00
|
|
|
CLASS net/minecraft/class_2991 net/minecraft/server/function/CommandFunctionManager
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT The command function manager implements execution of functions, like that from
|
|
|
|
COMMENT the {@code function} command.
|
|
|
|
FIELD field_13412 LOAD_TAG_ID Lnet/minecraft/class_2960;
|
|
|
|
FIELD field_13417 TICK_TAG_ID Lnet/minecraft/class_2960;
|
2019-06-28 17:55:20 -04:00
|
|
|
FIELD field_13418 tickFunctions Ljava/util/List;
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT A list of {@code minecraft:tick} tag functions to run on every tick. Set up on
|
|
|
|
COMMENT load, this is more efficient than polling the tag from the {@link #loader}
|
|
|
|
COMMENT every tick.
|
2019-06-28 17:55:20 -04:00
|
|
|
FIELD field_13419 server Lnet/minecraft/server/MinecraftServer;
|
2021-06-02 10:42:32 -04:00
|
|
|
FIELD field_13422 justLoaded Z
|
|
|
|
COMMENT Whether this command function manager has just {@linkplain #load(FunctionLoader)
|
|
|
|
COMMENT loaded} and should run all functions in the {@code minecraft:load} function tag.
|
2020-12-23 16:43:49 -05:00
|
|
|
FIELD field_25333 loader Lnet/minecraft/class_5349;
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT The source of functions for this command function manager.
|
|
|
|
FIELD field_33542 NO_TRACE_IN_FUNCTION_TEXT Lnet/minecraft/class_2561;
|
|
|
|
COMMENT A localized piece of text indicating that calling the debug command to debug
|
|
|
|
COMMENT functions from within a function is not supported.
|
|
|
|
FIELD field_33543 execution Lnet/minecraft/class_2991$class_6345;
|
|
|
|
COMMENT The active execution within this manager.
|
2020-12-23 16:43:49 -05:00
|
|
|
METHOD <init> (Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/class_5349;)V
|
|
|
|
ARG 1 server
|
|
|
|
ARG 2 loader
|
2021-06-02 10:42:32 -04:00
|
|
|
METHOD method_12899 getScheduledCommandSource ()Lnet/minecraft/class_2168;
|
|
|
|
COMMENT {@return the command source to execute scheduled functions} Scheduled functions
|
|
|
|
COMMENT are those from the {@code /schedule} command and those from the {@code
|
|
|
|
COMMENT minecraft:tick} tag.
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>This command source {@linkplain ServerCommandSource#hasPermissionLevel(int)
|
|
|
|
COMMENT has permission level 2} and is {@linkplain ServerCommandSource#withSilent()
|
|
|
|
COMMENT silent} compared to the server's {@linkplain MinecraftServer#getCommandSource()
|
|
|
|
COMMENT command source}.
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_12900 getDispatcher ()Lcom/mojang/brigadier/CommandDispatcher;
|
|
|
|
METHOD method_12902 getMaxCommandChainLength ()I
|
|
|
|
METHOD method_12904 execute (Lnet/minecraft/class_2158;Lnet/minecraft/class_2168;)I
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT Executes a function.
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>This is same as calling {@link #execute(CommandFunction, ServerCommandSource,
|
|
|
|
COMMENT Tracer) execute(function, source, null)}.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @return the command output value
|
|
|
|
COMMENT @see #execute(CommandFunction, ServerCommandSource, Tracer)
|
2019-06-28 17:55:20 -04:00
|
|
|
ARG 1 function
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT the function
|
2019-06-28 17:55:20 -04:00
|
|
|
ARG 2 source
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT the command source to execute with
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_12905 getFunction (Lnet/minecraft/class_2960;)Ljava/util/Optional;
|
2020-01-29 09:02:51 -05:00
|
|
|
ARG 1 id
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_18699 tick ()V
|
2020-12-23 16:43:49 -05:00
|
|
|
METHOD method_29460 executeAll (Ljava/util/Collection;Lnet/minecraft/class_2960;)V
|
|
|
|
ARG 1 functions
|
|
|
|
ARG 2 label
|
2021-06-02 10:42:32 -04:00
|
|
|
METHOD method_29461 setFunctions (Lnet/minecraft/class_5349;)V
|
|
|
|
COMMENT Sets the functions that this command function manager will use in executions.
|
2020-12-23 16:43:49 -05:00
|
|
|
ARG 1 loader
|
|
|
|
COMMENT the new loader functions will be taken from
|
2021-06-02 10:42:32 -04:00
|
|
|
METHOD method_29462 getTag (Lnet/minecraft/class_2960;)Lnet/minecraft/class_3494;
|
|
|
|
ARG 1 id
|
2020-12-23 16:43:49 -05:00
|
|
|
METHOD method_29463 getAllFunctions ()Ljava/lang/Iterable;
|
|
|
|
METHOD method_29464 getFunctionTags ()Ljava/lang/Iterable;
|
2021-06-02 10:42:32 -04:00
|
|
|
METHOD method_29773 load (Lnet/minecraft/class_5349;)V
|
2020-12-23 16:43:49 -05:00
|
|
|
ARG 1 loader
|
2021-05-05 07:53:37 -04:00
|
|
|
METHOD method_36341 execute (Lnet/minecraft/class_2158;Lnet/minecraft/class_2168;Lnet/minecraft/class_2991$class_6346;)I
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT Executes a function. This may have two cases: new or recursive.
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>In a new execution, the {@link #execution execution == null}, and a custom
|
|
|
|
COMMENT {@code tracer} can be specified. The return value indicates the number of
|
|
|
|
COMMENT commands and nested functions ran.
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>In a recursive execution, {@link #execution execution != null}. It is
|
|
|
|
COMMENT required that {@code tracer == null}, or the execution reports an error and is
|
|
|
|
COMMENT skipped. The return value is {@code 0}.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @return a non-zero value for a new execution, or {@code 0} for a recursive
|
|
|
|
COMMENT execution
|
|
|
|
COMMENT @see #execute(CommandFunction, ServerCommandSource)
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 1 function
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT the function
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 2 source
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT the command source to execute with
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 3 tracer
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT a tracer for a non-recursive function execution
|
2019-12-02 08:55:18 -05:00
|
|
|
CLASS class_2992 Entry
|
|
|
|
FIELD field_13424 source Lnet/minecraft/class_2168;
|
|
|
|
FIELD field_13425 element Lnet/minecraft/class_2158$class_2161;
|
2021-05-05 07:53:37 -04:00
|
|
|
FIELD field_33549 depth I
|
2021-04-14 13:18:43 -04:00
|
|
|
METHOD <init> (Lnet/minecraft/class_2168;ILnet/minecraft/class_2158$class_2161;)V
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 1 source
|
|
|
|
ARG 2 depth
|
2019-12-02 08:55:18 -05:00
|
|
|
ARG 3 element
|
2021-04-14 13:18:43 -04:00
|
|
|
METHOD method_12914 execute (Lnet/minecraft/class_2991;Ljava/util/Deque;ILnet/minecraft/class_2991$class_6346;)V
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 1 manager
|
2021-06-02 10:42:32 -04:00
|
|
|
ARG 2 entries
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 3 maxChainLength
|
|
|
|
ARG 4 tracer
|
2021-06-02 10:42:32 -04:00
|
|
|
CLASS class_6345 Execution
|
|
|
|
COMMENT An active execution of functions. It uses two deques to simulate a stack for a
|
|
|
|
COMMENT depth-first expansion of functions, as the function call stack depth may exceed
|
|
|
|
COMMENT the allowed JVM stack size.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @see CommandFunctionManager#execution
|
2021-05-05 07:53:37 -04:00
|
|
|
FIELD field_33545 depth I
|
|
|
|
FIELD field_33546 tracer Lnet/minecraft/class_2991$class_6346;
|
2021-06-02 10:42:32 -04:00
|
|
|
FIELD field_33547 queue Ljava/util/Deque;
|
|
|
|
FIELD field_33548 waitlist Ljava/util/List;
|
|
|
|
METHOD <init> (Lnet/minecraft/class_2991;Lnet/minecraft/class_2991$class_6346;)V
|
|
|
|
ARG 2 tracer
|
|
|
|
METHOD method_36343 recursiveRun (Lnet/minecraft/class_2158;Lnet/minecraft/class_2168;)V
|
|
|
|
COMMENT Handles a recursive case in {@link CommandFunctionManager#execute(CommandFunction,
|
|
|
|
COMMENT ServerCommandSource, CommandFunctionManager.Tracer)}.
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>This effectively swaps an entry with a command element with {@code /function}
|
|
|
|
COMMENT command at the head of the deque with another entry with a function element
|
2021-12-15 12:33:40 -05:00
|
|
|
COMMENT containing the actual command elements referenced in that function.
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 1 function
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT the function
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 2 source
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT the command source
|
2021-05-05 07:53:37 -04:00
|
|
|
METHOD method_36344 reportError (Ljava/lang/String;)V
|
|
|
|
ARG 1 message
|
2021-06-02 10:42:32 -04:00
|
|
|
METHOD method_36346 run (Lnet/minecraft/class_2158;Lnet/minecraft/class_2168;)I
|
|
|
|
COMMENT Handles a new case in {@link CommandFunctionManager#execute(CommandFunction,
|
|
|
|
COMMENT ServerCommandSource, CommandFunctionManager.Tracer)}.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @return a value for the command result
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 1 function
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT the function
|
2021-05-05 07:53:37 -04:00
|
|
|
ARG 2 source
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT the command source
|
2021-05-05 07:53:37 -04:00
|
|
|
CLASS class_6346 Tracer
|
2021-06-02 10:42:32 -04:00
|
|
|
COMMENT A tree-visitor-like tracer, useful for gaining insights on function execution.
|
2021-05-05 07:53:37 -04:00
|
|
|
METHOD method_36349 traceCommandStart (ILjava/lang/String;)V
|
|
|
|
ARG 1 depth
|
|
|
|
ARG 2 command
|
|
|
|
METHOD method_36350 traceCommandEnd (ILjava/lang/String;I)V
|
|
|
|
ARG 1 depth
|
|
|
|
ARG 2 command
|
|
|
|
ARG 3 result
|
|
|
|
METHOD method_36351 traceFunctionCall (ILnet/minecraft/class_2960;I)V
|
|
|
|
ARG 1 depth
|
|
|
|
ARG 2 function
|
|
|
|
ARG 3 size
|
|
|
|
METHOD method_36352 traceError (ILjava/lang/String;)V
|
|
|
|
ARG 1 depth
|
|
|
|
ARG 2 message
|