From 53e9c8abe51ee6a4e758d322962cf8115b149a24 Mon Sep 17 00:00:00 2001 From: BeetMacol Date: Mon, 5 Apr 2021 20:39:21 +0200 Subject: [PATCH] Add StartupParameter and GameTest mappings (#2248) * Add StartupParameter mappings * Remove the new BlockBox mappings - already covered in #2239 * Add mappings for all TestImplementation methods * Suggested changes rename `GameTest` to `GameTestState` rename `TestImplementation` to `GameTest` * More suggested changes * Fix GameTest package * Another package fix sorry Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> --- mappings/net/minecraft/test/GameTest.mapping | 79 +----- .../net/minecraft/test/GameTestState.mapping | 71 +++++ .../minecraft/test/StartupParameter.mapping | 254 ++++++++++++++++++ .../net/minecraft/test/TestFunctions.mapping | 2 +- 4 files changed, 335 insertions(+), 71 deletions(-) create mode 100644 mappings/net/minecraft/test/GameTestState.mapping diff --git a/mappings/net/minecraft/test/GameTest.mapping b/mappings/net/minecraft/test/GameTest.mapping index 85c0c93828..5a4b54ff49 100644 --- a/mappings/net/minecraft/test/GameTest.mapping +++ b/mappings/net/minecraft/test/GameTest.mapping @@ -1,70 +1,9 @@ -CLASS net/minecraft/class_4517 net/minecraft/test/GameTest - FIELD field_20559 testFunction Lnet/minecraft/class_4529; - FIELD field_20560 pos Lnet/minecraft/class_2338; - FIELD field_20561 world Lnet/minecraft/class_3218; - FIELD field_20562 listeners Ljava/util/Collection; - FIELD field_20563 ticksLeft I - FIELD field_20565 started Z - FIELD field_20567 completed Z - FIELD field_20569 throwable Ljava/lang/Throwable; - FIELD field_21452 timedTaskRunners Ljava/util/Collection; - FIELD field_21453 ticksByRunnables Lit/unimi/dsi/fastutil/objects/Object2LongMap; - FIELD field_21454 expectedStopTime J - FIELD field_21455 tick J - FIELD field_21456 stopwatch Lcom/google/common/base/Stopwatch; - FIELD field_25301 rotation Lnet/minecraft/class_2470; - FIELD field_27805 structureBlockEntity Lnet/minecraft/class_2633; - METHOD (Lnet/minecraft/class_4529;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;)V - ARG 1 testFunction - ARG 2 rotation - ARG 3 world - METHOD method_22165 tick ()V - METHOD method_22166 init (Lnet/minecraft/class_2338;I)V - ARG 1 pos - METHOD method_22167 addListener (Lnet/minecraft/class_4518;)V - ARG 1 listener - METHOD method_22168 fail (Ljava/lang/Throwable;)V - ARG 1 throwable - METHOD method_22169 getStructurePath ()Ljava/lang/String; - METHOD method_22171 (Lnet/minecraft/class_4518;)V - ARG 1 listener - METHOD method_22172 getPos ()Lnet/minecraft/class_2338; - METHOD method_22175 (Lnet/minecraft/class_4518;)V - ARG 1 listener - METHOD method_22176 getWorld ()Lnet/minecraft/class_3218; - METHOD method_22177 isPassed ()Z - METHOD method_22178 isFailed ()Z - METHOD method_22179 isStarted ()Z - METHOD method_22180 isCompleted ()Z - METHOD method_22182 getThrowable ()Ljava/lang/Throwable; - METHOD method_22183 isRequired ()Z - METHOD method_22184 isOptional ()Z - METHOD method_23634 startCountdown ()V - METHOD method_23635 setPos (Lnet/minecraft/class_2338;)V - ARG 1 pos - METHOD method_23636 (Lnet/minecraft/class_4693;)V - ARG 1 runner - METHOD method_23637 (Lnet/minecraft/class_4693;)V - ARG 1 runner - METHOD method_23638 getStructureName ()Ljava/lang/String; - METHOD method_23639 start ()V - METHOD method_23640 complete ()V - METHOD method_29402 getRotation ()Lnet/minecraft/class_2470; - METHOD method_29403 getTestFunction ()Lnet/minecraft/class_4529; - METHOD method_32240 clearArea ()V - METHOD method_32241 isFlaky ()Z - METHOD method_32242 getMaxAttempts ()I - METHOD method_32243 getRequiredSuccesses ()I - METHOD method_33315 tickTests ()V - METHOD method_33316 (Lnet/minecraft/class_4518;)V - ARG 1 listener - METHOD method_36059 getStructureBlockBlockEntity ()Lnet/minecraft/class_2633; - METHOD method_36060 runAtTick (JLjava/lang/Runnable;)V - ARG 1 tick - ARG 3 runnable - METHOD method_36061 getSize ()Lnet/minecraft/class_2382; - METHOD method_36062 getBoundingBox ()Lnet/minecraft/class_238; - METHOD method_36063 getElapsedMilliseconds ()J - METHOD method_36064 completeIfSuccessful ()V - METHOD method_36066 createTimedTaskRunner ()Lnet/minecraft/class_4693; - METHOD method_36067 getTicksLeft ()I +CLASS net/minecraft/class_6302 net/minecraft/test/GameTest + METHOD method_35932 tickLimit ()I + METHOD method_35933 batchId ()Ljava/lang/String; + METHOD method_35934 rotation ()I + METHOD method_35935 required ()Z + METHOD method_35936 structureName ()Ljava/lang/String; + METHOD method_35937 duration ()J + METHOD method_35938 maxAttempts ()I + METHOD method_35939 requiredSuccesses ()I diff --git a/mappings/net/minecraft/test/GameTestState.mapping b/mappings/net/minecraft/test/GameTestState.mapping new file mode 100644 index 0000000000..8b37da205b --- /dev/null +++ b/mappings/net/minecraft/test/GameTestState.mapping @@ -0,0 +1,71 @@ +CLASS net/minecraft/class_4517 net/minecraft/test/GameTestState + FIELD field_20559 testFunction Lnet/minecraft/class_4529; + FIELD field_20560 pos Lnet/minecraft/class_2338; + FIELD field_20561 world Lnet/minecraft/class_3218; + FIELD field_20562 listeners Ljava/util/Collection; + FIELD field_20563 ticksLeft I + FIELD field_20565 started Z + FIELD field_20567 completed Z + FIELD field_20569 throwable Ljava/lang/Throwable; + FIELD field_21452 timedTaskRunners Ljava/util/Collection; + FIELD field_21453 ticksByRunnables Lit/unimi/dsi/fastutil/objects/Object2LongMap; + FIELD field_21454 expectedStopTime J + FIELD field_21455 tick J + FIELD field_21456 stopwatch Lcom/google/common/base/Stopwatch; + FIELD field_25301 rotation Lnet/minecraft/class_2470; + FIELD field_27805 structureBlockEntity Lnet/minecraft/class_2633; + METHOD (Lnet/minecraft/class_4529;Lnet/minecraft/class_2470;Lnet/minecraft/class_3218;)V + ARG 1 testFunction + ARG 2 rotation + ARG 3 world + METHOD method_22165 tick ()V + METHOD method_22166 init (Lnet/minecraft/class_2338;I)V + ARG 1 pos + METHOD method_22167 addListener (Lnet/minecraft/class_4518;)V + ARG 1 listener + METHOD method_22168 fail (Ljava/lang/Throwable;)V + ARG 1 throwable + METHOD method_22169 getStructurePath ()Ljava/lang/String; + METHOD method_22171 (Lnet/minecraft/class_4518;)V + ARG 1 listener + METHOD method_22172 getPos ()Lnet/minecraft/class_2338; + METHOD method_22175 (Lnet/minecraft/class_4518;)V + ARG 1 listener + METHOD method_22176 getWorld ()Lnet/minecraft/class_3218; + METHOD method_22177 isPassed ()Z + METHOD method_22178 isFailed ()Z + METHOD method_22179 isStarted ()Z + METHOD method_22180 isCompleted ()Z + METHOD method_22182 getThrowable ()Ljava/lang/Throwable; + METHOD method_22183 isRequired ()Z + METHOD method_22184 isOptional ()Z + METHOD method_23634 startCountdown ()V + METHOD method_23635 setPos (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_23636 (Lnet/minecraft/class_4693;)V + ARG 1 runner + METHOD method_23637 (Lnet/minecraft/class_4693;)V + ARG 1 runner + METHOD method_23638 getStructureName ()Ljava/lang/String; + METHOD method_23639 start ()V + METHOD method_23640 complete ()V + METHOD method_29402 getRotation ()Lnet/minecraft/class_2470; + METHOD method_29403 getTestFunction ()Lnet/minecraft/class_4529; + METHOD method_32240 clearArea ()V + METHOD method_32241 isFlaky ()Z + METHOD method_32242 getMaxAttempts ()I + METHOD method_32243 getRequiredSuccesses ()I + METHOD method_33315 tickTests ()V + METHOD method_33316 (Lnet/minecraft/class_4518;)V + ARG 1 listener + METHOD method_36059 getStructureBlockBlockEntity ()Lnet/minecraft/class_2633; + METHOD method_36060 runAtTick (JLjava/lang/Runnable;)V + ARG 1 tick + ARG 3 runnable + METHOD method_36061 getSize ()Lnet/minecraft/class_2382; + METHOD method_36062 getBoundingBox ()Lnet/minecraft/class_238; + METHOD method_36063 getElapsedMilliseconds ()J + METHOD method_36064 completeIfSuccessful ()V + METHOD method_36066 createTimedTaskRunner ()Lnet/minecraft/class_4693; + METHOD method_36067 getTicksLeft ()I + METHOD method_36065 getTick ()J diff --git a/mappings/net/minecraft/test/StartupParameter.mapping b/mappings/net/minecraft/test/StartupParameter.mapping index e3c29ed89a..ec8962c8d8 100644 --- a/mappings/net/minecraft/test/StartupParameter.mapping +++ b/mappings/net/minecraft/test/StartupParameter.mapping @@ -1,4 +1,258 @@ CLASS net/minecraft/class_4516 net/minecraft/test/StartupParameter FIELD field_20558 test Lnet/minecraft/class_4517; + FIELD field_33146 hasFinalClause Z METHOD (Lnet/minecraft/class_4517;)V ARG 1 test + METHOD method_35943 getWorld ()Lnet/minecraft/class_3218; + METHOD method_35944 setTime (I)V + ARG 1 timeOfDay + METHOD method_35945 pushButton (III)V + ARG 1 x + ARG 2 y + ARG 3 z + METHOD method_35946 setBlockState (IIILnet/minecraft/class_2248;)V + ARG 1 x + ARG 2 y + ARG 3 z + ARG 4 block + METHOD method_35947 setBlockState (IIILnet/minecraft/class_2680;)V + ARG 1 x + ARG 2 y + ARG 3 z + ARG 4 state + METHOD method_35948 addFinalTaskWithDuration (ILjava/lang/Runnable;)V + ARG 1 duration + ARG 2 runnable + METHOD method_35951 runAtTick (JLjava/lang/Runnable;)V + ARG 1 tick + ARG 3 runnable + METHOD method_35952 (Lnet/minecraft/class_1297;)Z + ARG 0 entity + METHOD method_35953 expectEntityAt (Lnet/minecraft/class_1297;III)V + ARG 1 entity + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35955 expectEntityAt (Lnet/minecraft/class_1297;Lnet/minecraft/class_2338;)V + ARG 1 entity + ARG 2 pos + METHOD method_35959 expectEntity (Lnet/minecraft/class_1299;)V + ARG 1 type + METHOD method_35960 expectEntityToTouch (Lnet/minecraft/class_1299;DDD)V + ARG 1 type + ARG 2 x + ARG 4 y + ARG 6 z + METHOD method_35961 spawnEntity (Lnet/minecraft/class_1299;FFF)Lnet/minecraft/class_1297; + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35962 spawnEntity (Lnet/minecraft/class_1299;III)Lnet/minecraft/class_1297; + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35963 spawnEntity (Lnet/minecraft/class_1299;Lnet/minecraft/class_243;)Lnet/minecraft/class_1297; + ARG 1 type + ARG 2 pos + METHOD method_35964 spawnEntity (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1297; + ARG 1 type + ARG 2 pos + METHOD method_35965 expectEntityAround (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;D)V + ARG 1 type + ARG 2 pos + ARG 3 radius + METHOD method_35966 (Lnet/minecraft/class_1309;)Lnet/minecraft/class_1309; + ARG 1 entity + METHOD method_35967 (Lnet/minecraft/class_1308;Lnet/minecraft/class_2338;F)Lnet/minecraft/class_4693; + ARG 1 entity + ARG 2 pos + METHOD method_35968 spawnItem (Lnet/minecraft/class_1792;FFF)Lnet/minecraft/class_1542; + ARG 1 item + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35969 expectItemAt (Lnet/minecraft/class_1792;Lnet/minecraft/class_2338;D)V + ARG 1 item + ARG 2 pos + ARG 3 radius + METHOD method_35970 expectItemsAt (Lnet/minecraft/class_1792;Lnet/minecraft/class_2338;DI)V + ARG 1 item + ARG 2 pos + ARG 3 radius + ARG 5 amount + METHOD method_35971 expectBlock (Lnet/minecraft/class_2248;III)V + ARG 1 block + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35972 expectBlock (Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;)V + ARG 1 block + ARG 2 pos + METHOD method_35974 (Lnet/minecraft/class_2680;Lnet/minecraft/class_2248;Lnet/minecraft/class_2248;)Z + ARG 2 block1 + METHOD method_35976 (Lnet/minecraft/class_2769;Ljava/lang/Comparable;Lnet/minecraft/class_2680;)Z + ARG 2 state + METHOD method_35977 expectSameStates (Lnet/minecraft/class_3341;Lnet/minecraft/class_2338;)V + ARG 1 checkedBlockBox + ARG 2 correctStatePos + METHOD method_35978 getAbsolute (Lnet/minecraft/class_243;)Lnet/minecraft/class_243; + ARG 1 pos + METHOD method_35979 (Lnet/minecraft/class_243;Lnet/minecraft/class_1297;)Z + ARG 1 entity + METHOD method_35980 getBlockState (Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680; + ARG 1 pos + METHOD method_35981 putAndRemoveRedstoneBlock (Lnet/minecraft/class_2338;J)V + ARG 1 pos + ARG 2 delay + METHOD method_35982 expectEntityWithData (Lnet/minecraft/class_2338;Lnet/minecraft/class_1299;Ljava/util/function/Function;Ljava/lang/Object;)V + ARG 1 pos + ARG 2 type + ARG 3 entityDataGetter + ARG 4 data + METHOD method_35983 expectContainerWith (Lnet/minecraft/class_2338;Lnet/minecraft/class_1792;)V + ARG 1 pos + ARG 2 item + METHOD method_35984 setBlockState (Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;)V + ARG 1 pos + ARG 2 block + METHOD method_35985 (Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2248;)Z + ARG 3 block1 + METHOD method_35986 setBlockState (Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V + ARG 1 pos + ARG 2 state + METHOD method_35987 expectBlockProperty (Lnet/minecraft/class_2338;Lnet/minecraft/class_2769;Ljava/lang/Comparable;)V + ARG 1 pos + ARG 2 property + ARG 3 value + METHOD method_35988 checkBlockProperty (Lnet/minecraft/class_2338;Lnet/minecraft/class_2769;Ljava/util/function/Predicate;Ljava/lang/String;)V + ARG 1 pos + ARG 2 property + ARG 3 predicate + ARG 4 errorMessage + METHOD method_35989 (Lnet/minecraft/class_2338;Lnet/minecraft/class_3341;Lnet/minecraft/class_2338;)V + ARG 3 checkedPos + METHOD method_35990 expectSameStates (Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)V + ARG 1 checkedPos + ARG 2 correctStatePos + METHOD method_35991 checkBlock (Lnet/minecraft/class_2338;Ljava/util/function/Predicate;Ljava/lang/String;)V + ARG 1 pos + ARG 2 predicate + ARG 3 errorMessage + METHOD method_35992 checkBlock (Lnet/minecraft/class_2338;Ljava/util/function/Predicate;Ljava/util/function/Supplier;)V + ARG 1 pos + ARG 2 predicate + ARG 3 errorMessageSupplier + METHOD method_35993 addFinalTask (Ljava/lang/Runnable;)V + ARG 1 runnable + METHOD method_35999 (Ljava/util/function/Predicate;Lnet/minecraft/class_2680;)Z + ARG 1 state + METHOD method_36001 killAllEntities ()V + METHOD method_36002 toggleLever (III)V + ARG 1 x + ARG 2 y + ARG 3 z + METHOD method_36003 waitAndRun (JLjava/lang/Runnable;)V + ARG 1 ticks + ARG 3 runnable + METHOD method_36004 dontExpectEntity (Lnet/minecraft/class_1299;)V + ARG 1 type + METHOD method_36005 dontExpectEntityToTouch (Lnet/minecraft/class_1299;DDD)V + ARG 1 type + ARG 2 x + ARG 4 y + ARG 6 z + METHOD method_36006 spawnMob (Lnet/minecraft/class_1299;FFF)Lnet/minecraft/class_1308; + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36007 spawnMob (Lnet/minecraft/class_1299;III)Lnet/minecraft/class_1308; + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36008 spawnMob (Lnet/minecraft/class_1299;Lnet/minecraft/class_243;)Lnet/minecraft/class_1308; + ARG 1 type + ARG 2 pos + METHOD method_36009 spawnMob (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1308; + ARG 1 type + ARG 2 pos + METHOD method_36011 dontExpectBlock (Lnet/minecraft/class_2248;III)V + ARG 1 block + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36012 dontExpectBlock (Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;)V + ARG 1 block + ARG 2 pos + METHOD method_36013 (Lnet/minecraft/class_243;Lnet/minecraft/class_1297;)Z + ARG 1 entity + METHOD method_36014 getBlockEntity (Lnet/minecraft/class_2338;)Lnet/minecraft/class_2586; + ARG 1 pos + METHOD method_36017 checkBlockState (Lnet/minecraft/class_2338;Ljava/util/function/Predicate;Ljava/util/function/Supplier;)V + ARG 1 pos + ARG 2 predicate + ARG 3 errorMessageSupplier + METHOD method_36018 addInstantFinalTask (Ljava/lang/Runnable;)V + ARG 1 runnable + METHOD method_36021 createMockPlayer ()Lnet/minecraft/class_1657; + METHOD method_36022 expectEntityAt (Lnet/minecraft/class_1299;III)V + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36023 expectEntityAt (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)V + ARG 1 type + ARG 2 pos + METHOD method_36024 expectBlockAtEnd (Lnet/minecraft/class_2248;III)V + ARG 1 block + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36025 expectBlockAtEnd (Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;)V + ARG 1 block + ARG 2 pos + METHOD method_36026 pushButton (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36030 useNightTime ()V + METHOD method_36031 dontExpectEntityAt (Lnet/minecraft/class_1299;III)V + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36032 dontExpectEntityAt (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)V + ARG 1 type + ARG 2 pos + METHOD method_36034 useBlock (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36036 complete ()V + METHOD method_36037 (Lnet/minecraft/class_1299;III)V + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36038 (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)V + ARG 1 type + ARG 2 pos + METHOD method_36039 toggleLever (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36042 (Lnet/minecraft/class_1299;III)V + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36043 (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)V + ARG 2 pos + METHOD method_36044 removeBlock (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36045 getTick ()J + METHOD method_36047 expectEmptyContainer (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36048 markFinalCause ()V + METHOD method_36050 forceRandomTick (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36051 getTestBox ()Lnet/minecraft/class_238; + METHOD method_36052 getAbsolutePos (Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338; + ARG 1 pos + METHOD method_36054 (Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338; + ARG 1 pos diff --git a/mappings/net/minecraft/test/TestFunctions.mapping b/mappings/net/minecraft/test/TestFunctions.mapping index f642c68a85..8a8ef8b540 100644 --- a/mappings/net/minecraft/test/TestFunctions.mapping +++ b/mappings/net/minecraft/test/TestFunctions.mapping @@ -37,7 +37,7 @@ CLASS net/minecraft/class_4519 net/minecraft/test/TestFunctions ARG 1 args METHOD method_36072 invoke (Ljava/lang/reflect/Method;)Ljava/util/Collection; ARG 0 method - METHOD method_36073 (Ljava/lang/reflect/Method;)Lnet/minecraft/class_4529; + METHOD method_36073 parseTestMethod (Ljava/lang/reflect/Method;)Lnet/minecraft/class_4529; ARG 0 method METHOD method_36074 getInvoker (Ljava/lang/reflect/Method;)Ljava/util/function/Consumer; ARG 0 method