From 5accdd9fab86456dda539430d95f1e14e62d7870 Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Sun, 15 Oct 2023 00:49:10 +0900 Subject: [PATCH] Improve some names mapped in #3694 - `VirtualMachine` sounds like an expensive object to construct. This isn't really a VM, so rename it to something more neutral. - `Control` conflicts with the class in entity.ai package. Add a prefix. - Related changes. --- mappings/net/minecraft/command/CommandAction.mapping | 2 +- ...alMachine.mapping => CommandExecutionContext.mapping} | 6 +++--- mappings/net/minecraft/command/CommandQueueEntry.mapping | 2 +- mappings/net/minecraft/command/ControlFlowAware.mapping | 1 + .../{Control.mapping => ExecutionControl.mapping} | 2 +- mappings/net/minecraft/command/Forkable.mapping | 2 ++ .../net/minecraft/command/SingleCommandAction.mapping | 9 ++++++--- .../net/minecraft/command/SourcedCommandAction.mapping | 4 ++-- .../net/minecraft/command/SteppedCommandAction.mapping | 2 +- .../net/minecraft/server/command/CommandManager.mapping | 4 ++-- .../net/minecraft/server/command/DebugCommand.mapping | 2 +- .../server/function/CommandFunctionManager.mapping | 2 +- 12 files changed, 22 insertions(+), 16 deletions(-) rename mappings/net/minecraft/command/{VirtualMachine.mapping => CommandExecutionContext.mapping} (90%) rename mappings/net/minecraft/command/{Control.mapping => ExecutionControl.mapping} (78%) diff --git a/mappings/net/minecraft/command/CommandAction.mapping b/mappings/net/minecraft/command/CommandAction.mapping index b3107f6143..15d12c87bc 100644 --- a/mappings/net/minecraft/command/CommandAction.mapping +++ b/mappings/net/minecraft/command/CommandAction.mapping @@ -1,4 +1,4 @@ CLASS net/minecraft/class_8853 net/minecraft/command/CommandAction METHOD execute (Lnet/minecraft/class_8854;I)V - ARG 1 vm + ARG 1 context ARG 2 depth diff --git a/mappings/net/minecraft/command/VirtualMachine.mapping b/mappings/net/minecraft/command/CommandExecutionContext.mapping similarity index 90% rename from mappings/net/minecraft/command/VirtualMachine.mapping rename to mappings/net/minecraft/command/CommandExecutionContext.mapping index 6eb31513e5..c5c3e0c6fe 100644 --- a/mappings/net/minecraft/command/VirtualMachine.mapping +++ b/mappings/net/minecraft/command/CommandExecutionContext.mapping @@ -1,7 +1,7 @@ -CLASS net/minecraft/class_8854 net/minecraft/command/VirtualMachine +CLASS net/minecraft/class_8854 net/minecraft/command/CommandExecutionContext FIELD field_46729 MAX_COMMAND_QUEUE_LENGTH I FIELD field_46730 LOGGER Lorg/slf4j/Logger; - FIELD field_46731 commandsExecuted I + FIELD field_46731 maxCommandChainLength I FIELD field_46732 forkLimit I FIELD field_46733 profiler Lnet/minecraft/class_3695; FIELD field_46734 tracer Lnet/minecraft/class_6346; @@ -19,7 +19,7 @@ CLASS net/minecraft/class_8854 net/minecraft/command/VirtualMachine METHOD method_54392 enqueueCommand (Lnet/minecraft/class_8847;)V ARG 1 entry METHOD method_54393 enqueueCommand (Lnet/minecraft/class_8854;Ljava/lang/String;Lcom/mojang/brigadier/context/ContextChain;Lnet/minecraft/class_8839;)V - ARG 0 vm + ARG 0 context ARG 1 command ARG 3 source METHOD method_54394 setTracer (Lnet/minecraft/class_6346;)V diff --git a/mappings/net/minecraft/command/CommandQueueEntry.mapping b/mappings/net/minecraft/command/CommandQueueEntry.mapping index 58b8a252ec..e8b885987c 100644 --- a/mappings/net/minecraft/command/CommandQueueEntry.mapping +++ b/mappings/net/minecraft/command/CommandQueueEntry.mapping @@ -1,3 +1,3 @@ CLASS net/minecraft/class_8847 net/minecraft/command/CommandQueueEntry METHOD method_54388 execute (Lnet/minecraft/class_8854;)V - ARG 1 vm + ARG 1 context diff --git a/mappings/net/minecraft/command/ControlFlowAware.mapping b/mappings/net/minecraft/command/ControlFlowAware.mapping index 26a7f38337..d597ca171c 100644 --- a/mappings/net/minecraft/command/ControlFlowAware.mapping +++ b/mappings/net/minecraft/command/ControlFlowAware.mapping @@ -9,6 +9,7 @@ CLASS net/minecraft/class_8848 net/minecraft/command/ControlFlowAware ARG 1 context CLASS class_8850 Helper METHOD method_54255 sendError (Lcom/mojang/brigadier/exceptions/CommandSyntaxException;Lnet/minecraft/class_8839;Z)V + ARG 1 exception ARG 2 source ARG 3 silent METHOD method_54259 executeInner (Lnet/minecraft/class_8839;Lcom/mojang/brigadier/context/ContextChain;ZLnet/minecraft/class_8855;)V diff --git a/mappings/net/minecraft/command/Control.mapping b/mappings/net/minecraft/command/ExecutionControl.mapping similarity index 78% rename from mappings/net/minecraft/command/Control.mapping rename to mappings/net/minecraft/command/ExecutionControl.mapping index 033ef03fcd..590d489427 100644 --- a/mappings/net/minecraft/command/Control.mapping +++ b/mappings/net/minecraft/command/ExecutionControl.mapping @@ -1,4 +1,4 @@ -CLASS net/minecraft/class_8855 net/minecraft/command/Control +CLASS net/minecraft/class_8855 net/minecraft/command/ExecutionControl METHOD method_54401 doReturn ()V METHOD method_54402 enqueueAction (Lnet/minecraft/class_8853;)V ARG 1 action diff --git a/mappings/net/minecraft/command/Forkable.mapping b/mappings/net/minecraft/command/Forkable.mapping index 5f151325b9..d1f2e3fb19 100644 --- a/mappings/net/minecraft/command/Forkable.mapping +++ b/mappings/net/minecraft/command/Forkable.mapping @@ -5,3 +5,5 @@ CLASS net/minecraft/class_8851 net/minecraft/command/Forkable ARG 3 forkedMode ARG 4 control CLASS class_8852 RedirectModifier + METHOD apply (Lcom/mojang/brigadier/context/CommandContext;)Ljava/util/Collection; + ARG 1 context diff --git a/mappings/net/minecraft/command/SingleCommandAction.mapping b/mappings/net/minecraft/command/SingleCommandAction.mapping index ab523f5f9d..e8aa617588 100644 --- a/mappings/net/minecraft/command/SingleCommandAction.mapping +++ b/mappings/net/minecraft/command/SingleCommandAction.mapping @@ -4,8 +4,9 @@ CLASS net/minecraft/class_8858 net/minecraft/command/SingleCommandAction FIELD field_46741 contextChain Lcom/mojang/brigadier/context/ContextChain; METHOD (Ljava/lang/String;Lcom/mojang/brigadier/context/ContextChain;)V ARG 1 command + ARG 2 contextChain METHOD method_54407 traceCommandStart (Lnet/minecraft/class_8854;I)V - ARG 1 vm + ARG 1 context ARG 2 depth METHOD method_54408 (Lnet/minecraft/class_8865;ILnet/minecraft/class_8839;)Lnet/minecraft/class_8847; ARG 1 depth @@ -14,22 +15,24 @@ CLASS net/minecraft/class_8858 net/minecraft/command/SingleCommandAction ARG 0 count METHOD method_54410 execute (Ljava/util/List;Lnet/minecraft/class_8854;IZ)V ARG 1 forks - ARG 2 vm + ARG 2 context ARG 3 depth ARG 4 silent METHOD method_54411 fixAtDepth (Lnet/minecraft/class_8854;I)Lnet/minecraft/class_8855; - ARG 0 vm + ARG 0 context ARG 1 depth CLASS class_8859 MultiSource FIELD field_46744 forkedMode Z FIELD field_46745 sources Ljava/util/List; METHOD (Ljava/lang/String;Lcom/mojang/brigadier/context/ContextChain;ZLjava/util/List;)V ARG 1 command + ARG 2 contextChain ARG 3 forkedMode ARG 4 sources CLASS class_8860 SingleSource FIELD field_46746 source Lnet/minecraft/class_8839; METHOD (Ljava/lang/String;Lcom/mojang/brigadier/context/ContextChain;Lnet/minecraft/class_8839;)V ARG 1 command + ARG 2 contextChain ARG 3 source CLASS class_8861 Sourced diff --git a/mappings/net/minecraft/command/SourcedCommandAction.mapping b/mappings/net/minecraft/command/SourcedCommandAction.mapping index 90d7b15776..548173e2bd 100644 --- a/mappings/net/minecraft/command/SourcedCommandAction.mapping +++ b/mappings/net/minecraft/command/SourcedCommandAction.mapping @@ -3,8 +3,8 @@ CLASS net/minecraft/class_8856 net/minecraft/command/SourcedCommandAction ARG 1 source METHOD execute (Ljava/lang/Object;Lnet/minecraft/class_8854;I)V ARG 1 source - ARG 2 vm + ARG 2 context ARG 3 depth METHOD method_54405 (Ljava/lang/Object;Lnet/minecraft/class_8854;I)V - ARG 2 vm + ARG 2 context ARG 3 depth diff --git a/mappings/net/minecraft/command/SteppedCommandAction.mapping b/mappings/net/minecraft/command/SteppedCommandAction.mapping index 9aebba7198..c83aba95d4 100644 --- a/mappings/net/minecraft/command/SteppedCommandAction.mapping +++ b/mappings/net/minecraft/command/SteppedCommandAction.mapping @@ -8,7 +8,7 @@ CLASS net/minecraft/class_8863 net/minecraft/command/SteppedCommandAction ARG 2 actions ARG 3 depth METHOD method_54414 enqueueCommands (Lnet/minecraft/class_8854;ILjava/util/List;Lnet/minecraft/class_8863$class_8864;)V - ARG 0 vm + ARG 0 context ARG 1 depth ARG 2 actions ARG 3 wrapper diff --git a/mappings/net/minecraft/server/command/CommandManager.mapping b/mappings/net/minecraft/server/command/CommandManager.mapping index 626bd7ec73..844d50065a 100644 --- a/mappings/net/minecraft/server/command/CommandManager.mapping +++ b/mappings/net/minecraft/server/command/CommandManager.mapping @@ -30,11 +30,11 @@ CLASS net/minecraft/class_2170 net/minecraft/server/command/CommandManager ARG 0 registryLookup METHOD method_54312 throwException (Lcom/mojang/brigadier/ParseResults;)V ARG 0 parse - METHOD method_54313 callWithVm (Lnet/minecraft/class_2168;Ljava/util/function/Consumer;)V + METHOD method_54313 callWithContext (Lnet/minecraft/class_2168;Ljava/util/function/Consumer;)V ARG 0 commandSource ARG 1 callback METHOD method_54314 (Ljava/lang/String;Lcom/mojang/brigadier/context/ContextChain;Lnet/minecraft/class_2168;Lnet/minecraft/class_8854;)V - ARG 3 vm + ARG 3 context METHOD method_9235 getDispatcher ()Lcom/mojang/brigadier/CommandDispatcher; METHOD method_9236 (Ljava/lang/String;Lnet/minecraft/class_2583;)Lnet/minecraft/class_2583; ARG 1 style diff --git a/mappings/net/minecraft/server/command/DebugCommand.mapping b/mappings/net/minecraft/server/command/DebugCommand.mapping index 10d8d808ff..2adc19c16b 100644 --- a/mappings/net/minecraft/server/command/DebugCommand.mapping +++ b/mappings/net/minecraft/server/command/DebugCommand.mapping @@ -29,5 +29,5 @@ CLASS net/minecraft/class_3032 net/minecraft/server/command/DebugCommand METHOD method_36357 writeNewLine ()V CLASS class_8829 Command METHOD method_54257 (Ljava/util/Collection;Lnet/minecraft/class_2168;ILjava/lang/String;Lnet/minecraft/class_8854;I)V - ARG 4 vm + ARG 4 context ARG 5 depth diff --git a/mappings/net/minecraft/server/function/CommandFunctionManager.mapping b/mappings/net/minecraft/server/function/CommandFunctionManager.mapping index c16ef29598..4156229a78 100644 --- a/mappings/net/minecraft/server/function/CommandFunctionManager.mapping +++ b/mappings/net/minecraft/server/function/CommandFunctionManager.mapping @@ -54,4 +54,4 @@ CLASS net/minecraft/class_2991 net/minecraft/server/function/CommandFunctionMana METHOD method_29773 load (Lnet/minecraft/class_5349;)V ARG 1 loader METHOD method_54252 (Lnet/minecraft/class_8868;Lnet/minecraft/class_2168;Lnet/minecraft/class_8854;)V - ARG 2 vm + ARG 2 context