From 35113d513398e519ba048a5f2c38c59a4fc82816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E9=97=A8=E5=AE=88=E6=9C=9B=E8=80=85?= Date: Fri, 13 Aug 2021 19:08:22 +0800 Subject: [PATCH 01/12] Fixed A Mapping Mismatch in A Constructor Method (#2631) * Fixed A Mapping Mismatch in Constructor Method * Update mappings/net/minecraft/block/Material.mapping Yes. This value is for 'replaceable'. Agree. Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> --- mappings/net/minecraft/block/Material.mapping | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mappings/net/minecraft/block/Material.mapping b/mappings/net/minecraft/block/Material.mapping index 5cfdf97ae3..258d0d1f4b 100644 --- a/mappings/net/minecraft/block/Material.mapping +++ b/mappings/net/minecraft/block/Material.mapping @@ -84,8 +84,8 @@ CLASS net/minecraft/class_3614 net/minecraft/block/Material ARG 3 solid ARG 4 blocksMovement ARG 5 blocksLight - ARG 6 breakByHand - ARG 7 burnable + ARG 6 burnable + ARG 7 replaceable ARG 8 pistonBehavior METHOD method_15797 isLiquid ()Z METHOD method_15798 getPistonBehavior ()Lnet/minecraft/class_3619; From 260577f617d15298e70259d9b94c29c482b3bb28 Mon Sep 17 00:00:00 2001 From: enbrain <69905075+enbrain@users.noreply.github.com> Date: Sun, 15 Aug 2021 23:17:54 +0900 Subject: [PATCH 02/12] Document key binding instances (#2640) * Document key binding instances * Apply suggestions from code review Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> --- .../client/option/GameOptions.mapping | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/mappings/net/minecraft/client/option/GameOptions.mapping b/mappings/net/minecraft/client/option/GameOptions.mapping index 99d75cdbbf..f80e1ddff0 100644 --- a/mappings/net/minecraft/client/option/GameOptions.mapping +++ b/mappings/net/minecraft/client/option/GameOptions.mapping @@ -2,13 +2,19 @@ CLASS net/minecraft/class_315 net/minecraft/client/option/GameOptions FIELD field_1814 cloudRenderMode Lnet/minecraft/class_4063; FIELD field_1815 hideServerAddress Z FIELD field_1816 keySmoothCamera Lnet/minecraft/class_304; + COMMENT A key binding for toggling smooth camera. + COMMENT Not bound to any keys by default. FIELD field_1817 chatLinksPrompt Z FIELD field_1818 showSubtitles Z FIELD field_1819 forceUnicodeFont Z FIELD field_1820 chatOpacity D FIELD field_1822 keyInventory Lnet/minecraft/class_304; + COMMENT A key binding for opening {@linkplain net.minecraft.client.gui.screen.ingame.InventoryScreen the inventory screen}. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_E the E key} by default. FIELD field_1823 GSON Lcom/google/gson/Gson; FIELD field_1824 keyTogglePerspective Lnet/minecraft/class_304; + COMMENT A key binding for toggling perspective. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_F5 the F5 key} by default. FIELD field_1825 chatHeightUnfocused D FIELD field_1826 fov D FIELD field_1827 advancedItemTooltips Z @@ -16,25 +22,52 @@ CLASS net/minecraft/class_315 net/minecraft/client/option/GameOptions FIELD field_1829 mainArm Lnet/minecraft/class_1306; FIELD field_1830 realmsNotifications Z FIELD field_1831 keySwapHands Lnet/minecraft/class_304; + COMMENT A key binding for swapping the items in the selected slot and the off hand. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_F the F key} by default. + COMMENT + COMMENT

The selected slot is the slot the mouse is over when in a screen. + COMMENT Otherwise, it is the main hand. FIELD field_1832 keySneak Lnet/minecraft/class_304; + COMMENT A key binding for sneaking. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_LEFT_SHIFT the left shift key} by default. FIELD field_1834 LOGGER Lorg/apache/logging/log4j/Logger; FIELD field_1835 keyScreenshot Lnet/minecraft/class_304; + COMMENT A key binding for taking a screenshot. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_F2 the F2 key} by default. FIELD field_1836 keyFullscreen Lnet/minecraft/class_304; + COMMENT A key binding for toggling fullscreen. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_F11 the F11 key} by default. FIELD field_1837 pauseOnLostFocus Z FIELD field_1838 chatHeightFocused D FIELD field_1839 keysAll [Lnet/minecraft/class_304; + COMMENT An array of all key bindings. + COMMENT + COMMENT

Key bindings in this array are shown and can be configured in + COMMENT {@linkplain net.minecraft.client.gui.screen.option.ControlsOptionsScreen + COMMENT the controls options screen}. FIELD field_1840 gamma D FIELD field_1841 ao Lnet/minecraft/class_4060; FIELD field_1842 hudHidden Z FIELD field_1843 mouseSensitivity D FIELD field_1844 keyAdvancements Lnet/minecraft/class_304; + COMMENT A key binding for opening {@linkplain net.minecraft.client.gui.screen.advancement.AdvancementsScreen the advancements screen}. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_L the L key} by default. FIELD field_1845 keyCommand Lnet/minecraft/class_304; + COMMENT A key binding for opening {@linkplain net.minecraft.client.gui.screen.ChatScreen + COMMENT the chat screen} with the {@code /} already typed. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_SLASH the slash key} by default. FIELD field_1846 incompatibleResourcePacks Ljava/util/List; FIELD field_1847 snooperEnabled Z FIELD field_1848 autoJump Z FIELD field_1849 keyRight Lnet/minecraft/class_304; + COMMENT A key binding for moving right. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_D the D key} by default. FIELD field_1851 difficulty Lnet/minecraft/class_1267; FIELD field_1852 keysHotbar [Lnet/minecraft/class_304; + COMMENT Key bindings for selecting hotbar slots. + COMMENT Bound to the corresponding number keys (from {@linkplain + COMMENT org.lwjgl.glfw.GLFW#GLFW_KEY_1 the 1 key} to {@linkplain + COMMENT org.lwjgl.glfw.GLFW#GLFW_KEY_9 the 9 key}) by default. FIELD field_1853 COLON_SPLITTER Lcom/google/common/base/Splitter; FIELD field_1854 touchscreen Z FIELD field_1856 mipmapLevels I @@ -45,50 +78,83 @@ CLASS net/minecraft/class_315 net/minecraft/client/option/GameOptions FIELD field_1865 invertYMouse Z FIELD field_1866 debugEnabled Z FIELD field_1867 keySprint Lnet/minecraft/class_304; + COMMENT A key binding for sprinting. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_LEFT_CONTROL the left control key} by default. FIELD field_1868 guiScale I FIELD field_1869 keyDrop Lnet/minecraft/class_304; + COMMENT A key binding for dropping the item in the selected slot. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_Q the Q key} by default. + COMMENT + COMMENT

The selected slot is the slot the mouse is over when in a screen. + COMMENT Otherwise, it is the main hand. FIELD field_1870 viewDistance I FIELD field_1871 keyPickItem Lnet/minecraft/class_304; + COMMENT A key binding for holding an item corresponding to the {@linkplain net.minecraft.entity.Entity#getPickBlockStack() entity} + COMMENT or {@linkplain net.minecraft.block.Block#getPickStack(net.minecraft.world.BlockView, + COMMENT net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState) block} the player is looking at. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_MOUSE_BUTTON_MIDDLE the middle mouse button} by default. FIELD field_18725 backgroundForChatOnly Z FIELD field_18726 textBackgroundOpacity D FIELD field_1872 overrideWidth I FIELD field_1873 autoSuggestions Z FIELD field_1874 keyLoadToolbarActivator Lnet/minecraft/class_304; + COMMENT A key binding for loading the hotbar items in {@linkplain net.minecraft.world.GameMode#CREATIVE creative mode}. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_X the X key} by default. FIELD field_1875 tutorialStep Lnet/minecraft/class_1157; FIELD field_1876 useNativeTransport Z FIELD field_1877 chatVisibility Lnet/minecraft/class_1659; FIELD field_1878 biomeBlendRadius I FIELD field_1879 keySaveToolbarActivator Lnet/minecraft/class_304; + COMMENT A key binding for saving the hotbar items in {@linkplain net.minecraft.world.GameMode#CREATIVE creative mode}. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_C the C key} by default. FIELD field_1880 debugProfilerEnabled Z FIELD field_1881 keyBack Lnet/minecraft/class_304; + COMMENT A key binding for moving backward. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_S the S key} by default. FIELD field_1882 particles Lnet/minecraft/class_4066; FIELD field_1883 language Ljava/lang/String; FIELD field_1884 enableVsync Z FIELD field_1885 overrideHeight I FIELD field_1886 keyAttack Lnet/minecraft/class_304; + COMMENT A key binding for attacking an entity or breaking a block. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_MOUSE_BUTTON_LEFT the left mouse button} by default. FIELD field_1887 resourcePacks Ljava/util/List; FIELD field_1888 entityShadows Z FIELD field_1889 mouseWheelSensitivity D FIELD field_1890 keyChat Lnet/minecraft/class_304; + COMMENT A key binding for opening {@linkplain net.minecraft.client.gui.screen.ChatScreen the chat screen}. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_T the T key} by default. FIELD field_1891 bobView Z FIELD field_1892 enabledPlayerModelParts Ljava/util/Set; FIELD field_1893 debugTpsEnabled Z FIELD field_1894 keyForward Lnet/minecraft/class_304; + COMMENT A key binding for moving forward. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_W the W key} by default. FIELD field_1895 attackIndicator Lnet/minecraft/class_4061; FIELD field_1896 narrator Lnet/minecraft/class_4065; FIELD field_1897 optionsFile Ljava/io/File; FIELD field_1900 chatColors Z FIELD field_1901 glDebugVerbosity I FIELD field_1903 keyJump Lnet/minecraft/class_304; + COMMENT A key binding for jumping. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_SPACE the space key} by default. FIELD field_1904 keyUse Lnet/minecraft/class_304; + COMMENT A key binding for using an item, such as placing a block. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_MOUSE_BUTTON_RIGHT the right mouse button} by default. FIELD field_1905 heldItemTooltips Z FIELD field_1906 keySpectatorOutlines Lnet/minecraft/class_304; + COMMENT A key binding for highlighting players in {@linkplain net.minecraft.world.GameMode#SPECTATOR spectator mode}. + COMMENT Not bound to any keys by default. FIELD field_1907 keyPlayerList Lnet/minecraft/class_304; + COMMENT A key binding for displaying {@linkplain net.minecraft.client.gui.hud.PlayerListHud the player list}. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_TAB the tab key} by default. FIELD field_1908 chatScale D FIELD field_1909 maxFps I FIELD field_1910 reducedDebugInfo Z FIELD field_1911 chatLinks Z FIELD field_1913 keyLeft Lnet/minecraft/class_304; + COMMENT A key binding for moving left. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_A the A key} by default. FIELD field_1914 smoothCameraEnabled Z FIELD field_1915 chatWidth D FIELD field_1916 soundVolumeLevels Lit/unimi/dsi/fastutil/objects/Object2FloatMap; @@ -107,6 +173,8 @@ CLASS net/minecraft/class_315 net/minecraft/client/option/GameOptions FIELD field_26677 perspective Lnet/minecraft/class_5498; FIELD field_26844 joinedFirstServer Z FIELD field_26845 keySocialInteractions Lnet/minecraft/class_304; + COMMENT A key binding for opening {@linkplain net.minecraft.client.gui.screen.multiplayer.SocialInteractionsScreen the social interactions screen}. + COMMENT Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_P the P key} by default. FIELD field_26926 hideMatchedNames Z FIELD field_28777 hideBundleTutorial Z FIELD field_32156 monochromeLogo Z From c1602ae643fde8c48c390bcd72206f98e61c8907 Mon Sep 17 00:00:00 2001 From: Devan-Kerman Date: Sat, 21 Aug 2021 04:37:06 -0500 Subject: [PATCH 03/12] Update Element.mapping (#2641) --- mappings/net/minecraft/client/gui/Element.mapping | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mappings/net/minecraft/client/gui/Element.mapping b/mappings/net/minecraft/client/gui/Element.mapping index 309af6a25d..6bbb4e688e 100644 --- a/mappings/net/minecraft/client/gui/Element.mapping +++ b/mappings/net/minecraft/client/gui/Element.mapping @@ -53,7 +53,7 @@ CLASS net/minecraft/class_364 net/minecraft/client/gui/Element ARG 3 mouseY COMMENT the Y coordinate of the mouse ARG 5 amount - COMMENT value is {@code > 1} if scrolled down, {@code < 1} if scrolled up + COMMENT value is {@code < 0} if scrolled down, {@code > 0} if scrolled up METHOD method_25402 mouseClicked (DDI)Z COMMENT Callback for when a mouse button down event COMMENT has been captured. From b1b21797110d7022eeca8528b919993ef540543f Mon Sep 17 00:00:00 2001 From: Jakob K <52456572+jakobkmar@users.noreply.github.com> Date: Sun, 22 Aug 2021 23:15:13 +0200 Subject: [PATCH 04/12] Improve ChunkStatus mappings (#2619) * Improve ChunkStatus mappings * Do not remap non-obfuscated doWork functions --- mappings/net/minecraft/world/chunk/ChunkStatus.mapping | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mappings/net/minecraft/world/chunk/ChunkStatus.mapping b/mappings/net/minecraft/world/chunk/ChunkStatus.mapping index 1a03874db5..4634e36602 100644 --- a/mappings/net/minecraft/world/chunk/ChunkStatus.mapping +++ b/mappings/net/minecraft/world/chunk/ChunkStatus.mapping @@ -70,6 +70,7 @@ CLASS net/minecraft/class_2806 net/minecraft/world/chunk/ChunkStatus ARG 1 world ARG 2 structureManager ARG 3 lightingProvider + ARG 4 convertCallback ARG 5 chunk METHOD method_20610 getLightingFuture (Lnet/minecraft/class_2806;Lnet/minecraft/class_3227;Lnet/minecraft/class_2791;)Ljava/util/concurrent/CompletableFuture; ARG 0 status @@ -112,6 +113,8 @@ CLASS net/minecraft/class_2806 net/minecraft/world/chunk/ChunkStatus ARG 3 world ARG 5 structureManager ARG 6 lightingProvider + ARG 7 convertCallback + COMMENT will be invoked by statuses which have some special convert logic (e.g. the FULL status to convert the chunk to a full chunk) CLASS class_2808 ChunkType COMMENT Specifies the type of a chunk FIELD field_12807 LEVELCHUNK Lnet/minecraft/class_2806$class_2808; @@ -129,4 +132,6 @@ CLASS net/minecraft/class_2806 net/minecraft/world/chunk/ChunkStatus ARG 2 world ARG 3 structureManager ARG 4 lightingProvider + ARG 5 convertCallback + COMMENT will be invoked by statuses which have some special convert logic (e.g. the FULL status to convert the chunk to a full chunk) ARG 6 chunk From 55c122e98733d5f7400138e340e9d3fb57af9d33 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Mon, 23 Aug 2021 00:15:46 +0300 Subject: [PATCH 05/12] Rename and document HoeItem tilling names (#2635) * Rename and document HoeItem tilling names - TILLED_BLOCKS -> TILLING_ACTIONS (it's not a pure block->block map anymore) - getTillingConsumer -> getTillingAction: more descriptive this way - usagePredicate -> canUse: more conventional and descriptive name for a boolean-returning method * HoeItem.canUse -> canTill * Address code review * Code review part II * Update mappings/net/minecraft/item/HoeItem.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> --- mappings/net/minecraft/item/HoeItem.mapping | 25 +++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/mappings/net/minecraft/item/HoeItem.mapping b/mappings/net/minecraft/item/HoeItem.mapping index 707a329c53..5ee7f048d0 100644 --- a/mappings/net/minecraft/item/HoeItem.mapping +++ b/mappings/net/minecraft/item/HoeItem.mapping @@ -1,5 +1,9 @@ CLASS net/minecraft/class_1794 net/minecraft/item/HoeItem - FIELD field_8023 TILLED_BLOCKS Ljava/util/Map; + FIELD field_8023 TILLING_ACTIONS Ljava/util/Map; + COMMENT A map of input blocks to predicate-consumer action pairs. + COMMENT + COMMENT

Tilling works so that if the predicate succeeds, the consumer (the real action) + COMMENT is executed, and the hoe is damaged. METHOD (Lnet/minecraft/class_1832;IFLnet/minecraft/class_1792$class_1793;)V ARG 1 material ARG 2 attackDamage @@ -9,12 +13,19 @@ CLASS net/minecraft/class_1794 net/minecraft/item/HoeItem ARG 1 p METHOD method_36984 (Lnet/minecraft/class_2680;Lnet/minecraft/class_1838;)V ARG 1 context - METHOD method_36985 getTillingConsumer (Lnet/minecraft/class_2680;Lnet/minecraft/class_1935;)Ljava/util/function/Consumer; - ARG 0 state - ARG 1 dropItem + METHOD method_36985 createTillAndDropAction (Lnet/minecraft/class_2680;Lnet/minecraft/class_1935;)Ljava/util/function/Consumer; + COMMENT {@return a tilling action that sets a block state and drops an item} + ARG 0 result + COMMENT the tilled block state + ARG 1 droppedItem + COMMENT the item to drop METHOD method_36986 (Lnet/minecraft/class_2680;Lnet/minecraft/class_1935;Lnet/minecraft/class_1838;)V ARG 2 context - METHOD method_36987 usagePredicate (Lnet/minecraft/class_1838;)Z + METHOD method_36987 canTillFarmland (Lnet/minecraft/class_1838;)Z + COMMENT {@return whether the used block can be tilled into farmland} + COMMENT This method is used as the tilling predicate for most vanilla blocks except rooted dirt. ARG 0 context - METHOD method_36988 getTillingConsumer (Lnet/minecraft/class_2680;)Ljava/util/function/Consumer; - ARG 0 state + METHOD method_36988 createTillAction (Lnet/minecraft/class_2680;)Ljava/util/function/Consumer; + COMMENT {@return a tilling action that sets a block state} + ARG 0 result + COMMENT the tilled block state From 755162fb983c92b6c6fe3b49c198ad7316405f90 Mon Sep 17 00:00:00 2001 From: Evan Steinkerchner Date: Sun, 22 Aug 2021 17:21:41 -0400 Subject: [PATCH 06/12] Update method mappings in RecipesProvider (#2644) --- mappings/net/minecraft/data/server/RecipesProvider.mapping | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mappings/net/minecraft/data/server/RecipesProvider.mapping b/mappings/net/minecraft/data/server/RecipesProvider.mapping index 7d6fe8c893..ef9704cc7d 100644 --- a/mappings/net/minecraft/data/server/RecipesProvider.mapping +++ b/mappings/net/minecraft/data/server/RecipesProvider.mapping @@ -224,14 +224,14 @@ CLASS net/minecraft/class_2446 net/minecraft/data/server/RecipesProvider METHOD method_33714 convertBetween (Lnet/minecraft/class_1935;Lnet/minecraft/class_1935;)Ljava/lang/String; ARG 0 from ARG 1 to - METHOD method_33715 offerRecipe (Ljava/util/function/Consumer;Lnet/minecraft/class_1935;Lnet/minecraft/class_1935;I)V + METHOD method_33715 offerStonecuttingRecipe (Ljava/util/function/Consumer;Lnet/minecraft/class_1935;Lnet/minecraft/class_1935;I)V ARG 0 exporter ARG 1 output ARG 2 input ARG 3 count METHOD method_33716 getItemPath (Lnet/minecraft/class_1935;)Ljava/lang/String; ARG 0 item - METHOD method_33717 offerRecipe (Ljava/util/function/Consumer;Lnet/minecraft/class_1935;Lnet/minecraft/class_1935;)V + METHOD method_33717 offerStonecuttingRecipe (Ljava/util/function/Consumer;Lnet/minecraft/class_1935;Lnet/minecraft/class_1935;)V ARG 0 exporter ARG 1 output ARG 2 input From 83b0f873a0db6677da3d613ca40f6dec1abeafef Mon Sep 17 00:00:00 2001 From: haykam821 <24855774+haykam821@users.noreply.github.com> Date: Wed, 25 Aug 2021 11:25:38 -0400 Subject: [PATCH 07/12] Document the BooleanBiFunction interface (#2493) * Document the BooleanBiFunction interface * Fix the documentation for the BooleanBiFunction#CAUSES and BooleanBiFunction#CAUSED_BY fields being incorrect Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../util/function/BooleanBiFunction.mapping | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mappings/net/minecraft/util/function/BooleanBiFunction.mapping b/mappings/net/minecraft/util/function/BooleanBiFunction.mapping index 6cc9cfb980..299dead890 100644 --- a/mappings/net/minecraft/util/function/BooleanBiFunction.mapping +++ b/mappings/net/minecraft/util/function/BooleanBiFunction.mapping @@ -1,20 +1,37 @@ CLASS net/minecraft/class_247 net/minecraft/util/function/BooleanBiFunction + COMMENT A function that is provided two booleans and returns one boolean. FIELD field_1366 OR Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if either argument is {@code true}. FIELD field_16885 NOT_OR Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if neither argument is {@code true}. FIELD field_16886 ONLY_FIRST Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if only the first argument is {@code true}. FIELD field_16887 SECOND Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if the second argument is {@code true}. FIELD field_16888 NOT_AND Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if either argument is {@code false}. FIELD field_16889 CAUSES Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if the first argument is {@code false} or the second argument is {@code true}. FIELD field_16890 SAME Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if both arguments are {@code true} or both arguments are {@code false}. FIELD field_16891 FIRST Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if the first argument is {@code true}. FIELD field_16892 NOT_SAME Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if one argument is {@code true} and the other is {@code false}. FIELD field_16893 ONLY_SECOND Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if only the second argument is {@code true}. FIELD field_16894 NOT_FIRST Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if the first argument is {@code false}. FIELD field_16895 TRUE Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that always returns {@code true}. FIELD field_16896 AND Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if both arguments are {@code true}. FIELD field_16897 FALSE Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that always returns {@code false}. FIELD field_16898 NOT_SECOND Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if the second argument is {@code false}. FIELD field_16899 CAUSED_BY Lnet/minecraft/class_247; + COMMENT A {@link BooleanBiFunction} that returns {@code true} if the first argument is {@code true} or the second argument is {@code false}. METHOD apply (ZZ)Z ARG 1 a ARG 2 b From 15d3ef9a796de0b7dee86abbeaaa8a7d8be114cd Mon Sep 17 00:00:00 2001 From: haykam821 <24855774+haykam821@users.noreply.github.com> Date: Wed, 25 Aug 2021 11:25:53 -0400 Subject: [PATCH 08/12] Rename the GameModeSelectionScreen.GameMode class to GameModeSelection (#2647) Fixes #2626 --- .../minecraft/client/gui/screen/GameModeSelectionScreen.mapping | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mappings/net/minecraft/client/gui/screen/GameModeSelectionScreen.mapping b/mappings/net/minecraft/client/gui/screen/GameModeSelectionScreen.mapping index 57872496cf..c2cb6ee782 100644 --- a/mappings/net/minecraft/client/gui/screen/GameModeSelectionScreen.mapping +++ b/mappings/net/minecraft/client/gui/screen/GameModeSelectionScreen.mapping @@ -18,7 +18,7 @@ CLASS net/minecraft/class_5289 net/minecraft/client/gui/screen/GameModeSelection METHOD method_28068 apply ()V METHOD method_28069 checkForClose ()Z METHOD method_30106 getPreviousGameMode ()Lnet/minecraft/class_1934; - CLASS class_5290 GameMode + CLASS class_5290 GameModeSelection FIELD field_24580 VALUES [Lnet/minecraft/class_5289$class_5290; FIELD field_24581 text Lnet/minecraft/class_2561; FIELD field_24582 command Ljava/lang/String; From 2920a46c9653132f97a2b1eafa40e9c99de69862 Mon Sep 17 00:00:00 2001 From: haykam821 <24855774+haykam821@users.noreply.github.com> Date: Wed, 25 Aug 2021 11:26:03 -0400 Subject: [PATCH 09/12] Rename the StatusEffectType class to StatusEffectCategory (#2648) --- .../entity/effect/DamageModifierStatusEffect.mapping | 2 +- mappings/net/minecraft/entity/effect/StatusEffect.mapping | 6 +++--- ...tatusEffectType.mapping => StatusEffectCategory.mapping} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename mappings/net/minecraft/entity/effect/{StatusEffectType.mapping => StatusEffectCategory.mapping} (94%) diff --git a/mappings/net/minecraft/entity/effect/DamageModifierStatusEffect.mapping b/mappings/net/minecraft/entity/effect/DamageModifierStatusEffect.mapping index 4c16689a52..b7b2360a8b 100644 --- a/mappings/net/minecraft/entity/effect/DamageModifierStatusEffect.mapping +++ b/mappings/net/minecraft/entity/effect/DamageModifierStatusEffect.mapping @@ -1,6 +1,6 @@ CLASS net/minecraft/class_1287 net/minecraft/entity/effect/DamageModifierStatusEffect FIELD field_5881 modifier D METHOD (Lnet/minecraft/class_4081;ID)V - ARG 1 type + ARG 1 category ARG 2 color ARG 3 modifier diff --git a/mappings/net/minecraft/entity/effect/StatusEffect.mapping b/mappings/net/minecraft/entity/effect/StatusEffect.mapping index d125b576c5..f64aeb5572 100644 --- a/mappings/net/minecraft/entity/effect/StatusEffect.mapping +++ b/mappings/net/minecraft/entity/effect/StatusEffect.mapping @@ -1,12 +1,12 @@ CLASS net/minecraft/class_1291 net/minecraft/entity/effect/StatusEffect - FIELD field_18270 type Lnet/minecraft/class_4081; + FIELD field_18270 category Lnet/minecraft/class_4081; FIELD field_5883 translationKey Ljava/lang/String; FIELD field_5885 attributeModifiers Ljava/util/Map; FIELD field_5886 color I METHOD (Lnet/minecraft/class_4081;I)V - ARG 1 type + ARG 1 category ARG 2 color - METHOD method_18792 getType ()Lnet/minecraft/class_4081; + METHOD method_18792 getCategory ()Lnet/minecraft/class_4081; METHOD method_5552 canApplyUpdateEffect (II)Z ARG 1 duration ARG 2 amplifier diff --git a/mappings/net/minecraft/entity/effect/StatusEffectType.mapping b/mappings/net/minecraft/entity/effect/StatusEffectCategory.mapping similarity index 94% rename from mappings/net/minecraft/entity/effect/StatusEffectType.mapping rename to mappings/net/minecraft/entity/effect/StatusEffectCategory.mapping index c6a1d92e4a..7daa9edd74 100644 --- a/mappings/net/minecraft/entity/effect/StatusEffectType.mapping +++ b/mappings/net/minecraft/entity/effect/StatusEffectCategory.mapping @@ -1,4 +1,4 @@ -CLASS net/minecraft/class_4081 net/minecraft/entity/effect/StatusEffectType +CLASS net/minecraft/class_4081 net/minecraft/entity/effect/StatusEffectCategory FIELD field_18274 formatting Lnet/minecraft/class_124; METHOD (Ljava/lang/String;ILnet/minecraft/class_124;)V ARG 3 format From 19070213b23be79b0e782a1ee789e6a17b2d625d Mon Sep 17 00:00:00 2001 From: haykam821 <24855774+haykam821@users.noreply.github.com> Date: Tue, 31 Aug 2021 15:39:59 -0400 Subject: [PATCH 10/12] Rename and document the BedBlock.isOverworld method (#2651) * Rename the BedBlock.isOverworld method to isBedWorking Fixes #2645 * Document the BedBlock.isBedWorking method --- mappings/net/minecraft/block/BedBlock.mapping | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mappings/net/minecraft/block/BedBlock.mapping b/mappings/net/minecraft/block/BedBlock.mapping index 55224845b2..05201667ec 100644 --- a/mappings/net/minecraft/block/BedBlock.mapping +++ b/mappings/net/minecraft/block/BedBlock.mapping @@ -28,7 +28,11 @@ CLASS net/minecraft/class_2244 net/minecraft/block/BedBlock ARG 0 state METHOD method_24164 getBedPart (Lnet/minecraft/class_2680;)Lnet/minecraft/class_4732$class_4733; ARG 0 state - METHOD method_27352 isOverworld (Lnet/minecraft/class_1937;)Z + METHOD method_27352 isBedWorking (Lnet/minecraft/class_1937;)Z + COMMENT {@return whether the world's {@linkplain net.minecraft.world.dimension.DimensionType dimension type} + COMMENT allows beds to be respawned at and slept in without exploding} + COMMENT + COMMENT @see net.minecraft.world.dimension.DimensionType#isBedWorking() ARG 0 world METHOD method_30835 findWakeUpPosition (Lnet/minecraft/class_1299;Lnet/minecraft/class_1941;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_2350;)Ljava/util/Optional; ARG 0 type From 64b428097f66c928c156f38cff40360829b416c9 Mon Sep 17 00:00:00 2001 From: liach <7806504+liach@users.noreply.github.com> Date: Tue, 31 Aug 2021 14:40:12 -0500 Subject: [PATCH 11/12] NativeImage new stuff and refactors, significantly improve consistency (#2528) Fixes #2527 Signed-off-by: liach Co-authored-by: liach Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../client/texture/NativeImage.mapping | 115 ++++++++++++------ 1 file changed, 81 insertions(+), 34 deletions(-) diff --git a/mappings/net/minecraft/client/texture/NativeImage.mapping b/mappings/net/minecraft/client/texture/NativeImage.mapping index db2a742edd..3fdd07a18e 100644 --- a/mappings/net/minecraft/client/texture/NativeImage.mapping +++ b/mappings/net/minecraft/client/texture/NativeImage.mapping @@ -1,5 +1,18 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage FIELD field_21684 LOGGER Lorg/apache/logging/log4j/Logger; + FIELD field_32031 ALPHA_OFFSET I + COMMENT The bit offset of the alpha data in the {@linkplain Format#RGBA RGBA} format. + COMMENT Is {@value}. Notice the alpha data in {@linkplain Format#LUMINANCE_ALPHA + COMMENT luminance-alpha} format has a different offset of {@code 8}. + FIELD field_32032 BLUE_OFFSET I + COMMENT The bit offset of the blue data in the {@linkplain Format#RGBA RGBA} or the + COMMENT {@linkplain Format#RGB RGB} formats. Is {@value}. + FIELD field_32033 GREEN_OFFSET I + COMMENT The bit offset of the green data in the {@linkplain Format#RGBA RGBA} or the + COMMENT {@linkplain Format#RGB RGB} formats. Is {@value}. + FIELD field_32034 RED_OFFSET I + COMMENT The bit offset of the red data in the {@linkplain Format#RGBA RGBA} or the + COMMENT {@linkplain Format#RGB RGB} formats. Is {@value}. FIELD field_4986 format Lnet/minecraft/class_1011$class_1012; FIELD field_4987 sizeBytes J FIELD field_4988 pointer J @@ -38,13 +51,15 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage ARG 11 close METHOD method_24030 getAlpha (I)I ARG 0 color - METHOD method_24031 getAbgrColor (IIII)I - COMMENT The resulting color of this operation is stored as least to most significant bits. + METHOD method_24031 packColor (IIII)I + COMMENT The resulting color of this operation is stored as RGBA from least to most + COMMENT significant bits, or from smallest to biggest bits. ARG 0 alpha ARG 1 blue ARG 2 green ARG 3 red METHOD method_24032 write (Ljava/nio/channels/WritableByteChannel;)Z + ARG 1 channel METHOD method_24033 getRed (I)I ARG 0 color METHOD method_24034 getGreen (I)I @@ -52,14 +67,18 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage METHOD method_24035 getBlue (I)I ARG 0 color METHOD method_24036 getBytes ()[B - METHOD method_35621 setPixelLuminance (IIB)V + METHOD method_35620 readDepthComponent (F)V + ARG 1 unused + METHOD method_35621 setLuminance (IIB)V ARG 1 x ARG 2 y ARG 3 luminance + METHOD method_35622 writeTo (Ljava/lang/String;)V + ARG 1 path METHOD method_35623 getRed (II)B ARG 1 x ARG 2 y - METHOD method_35624 blendPixel (III)V + METHOD method_35624 blend (III)V ARG 1 x ARG 2 y ARG 3 color @@ -69,6 +88,9 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage METHOD method_35626 getBlue (II)B ARG 1 x ARG 2 y + METHOD method_35627 drawPixels ()V + COMMENT Use {@code upload} to upload this image to GL so it can be used later. This + COMMENT method is not used in vanilla, and its side effects are not yet known. METHOD method_36559 isOutOfBounds (II)Z ARG 1 x ARG 2 y @@ -86,6 +108,7 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage METHOD method_4302 untrack ()V METHOD method_4303 read (Lnet/minecraft/class_1011$class_1012;Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011; ARG 0 format + ARG 1 buffer METHOD method_4304 copyRect (IIIIIIZZ)V ARG 1 x ARG 2 y @@ -95,22 +118,27 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage ARG 6 height ARG 7 flipX ARG 8 flipY - METHOD method_4305 setPixelColor (III)V + METHOD method_4305 setColor (III)V COMMENT Sets the color of a pixel on this native image. - COMMENT The color to be set using this method should be in a ABGR format. + COMMENT The color to be set by this method will be in a big-endian (from biggest + COMMENT to smallest bits) ABGR format, or little-endian RGBA. COMMENT - COMMENT

This is only supported when this native image's format is {@link NativeImage.Format#ABGR ABGR} + COMMENT @throws IllegalArgumentException when this native image's format is not + COMMENT {@linkplain Format#RGBA little-endian RGBA}, or the coordinate is out-of-bounds ARG 1 x ARG 2 y ARG 3 color + COMMENT the color, with red at smallest and alpha at biggest bits METHOD method_4307 getWidth ()I METHOD method_4308 setTextureFilter (ZZ)V ARG 0 blur ARG 1 mipmap METHOD method_4309 read (Ljava/io/InputStream;)Lnet/minecraft/class_1011; + ARG 0 stream METHOD method_4310 read (Lnet/minecraft/class_1011$class_1012;Ljava/io/InputStream;)Lnet/minecraft/class_1011; ARG 0 format - METHOD method_4311 getPixelOpacity (II)B + ARG 1 stream + METHOD method_4311 getOpacity (II)B ARG 1 x ARG 2 y METHOD method_4312 upload (IIIIIIIZZ)V @@ -123,13 +151,16 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage ARG 7 height ARG 8 mipmap ARG 9 close - METHOD method_4314 writeFile (Ljava/nio/file/Path;)V + METHOD method_4314 writeTo (Ljava/nio/file/Path;)V ARG 1 path - METHOD method_4315 getPixelColor (II)I + METHOD method_4315 getColor (II)I COMMENT Gets the color of a pixel on this native image. - COMMENT The color returned by this method will be in a ABGR format. + COMMENT The color returned by this method will be in a big-endian (from biggest + COMMENT to smallest bits) ABGR format, or little-endian RGBA. COMMENT - COMMENT

This is only supported when this native image's format is {@link NativeImage.Format#ABGR ABGR}. + COMMENT @throws IllegalArgumentException when this native image's format is not + COMMENT {@linkplain Format#RGBA little-endian RGBA}, or the coordinate is out-of-bounds + COMMENT @return the color, with red at smallest and alpha at biggest bits ARG 1 x ARG 2 y METHOD method_4316 makeGlyphBitmapSubpixel (Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)V @@ -163,7 +194,9 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage METHOD method_4322 makePixelArray ()[I METHOD method_4323 getHeight ()I METHOD method_4324 read (Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011; - METHOD method_4325 writeFile (Ljava/io/File;)V + ARG 0 buffer + METHOD method_4325 writeTo (Ljava/io/File;)V + ARG 1 path METHOD method_4326 fillRect (IIIII)V ARG 1 x ARG 2 y @@ -174,23 +207,30 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage ARG 1 level ARG 2 removeAlpha CLASS class_1012 Format - FIELD field_4993 pixelDataFormat I + FIELD field_4993 glFormat I FIELD field_4994 channelCount I FIELD field_4996 writeable Z - FIELD field_4997 ABGR Lnet/minecraft/class_1011$class_1012; + FIELD field_4997 RGBA Lnet/minecraft/class_1011$class_1012; + COMMENT The format stores RGBA in little endian order, so it's ABGR from the biggest to + COMMENT the smallest bits. FIELD field_4999 hasAlpha Z FIELD field_5000 hasLuminance Z - FIELD field_5001 BGR Lnet/minecraft/class_1011$class_1012; + FIELD field_5001 RGB Lnet/minecraft/class_1011$class_1012; + COMMENT The format stores RGB in little endian order, so it's BGR from the biggest to + COMMENT the smallest bits. + FIELD field_5002 LUMINANCE_ALPHA Lnet/minecraft/class_1011$class_1012; + COMMENT The format stores luminance and alpha in little endian order, so it's alpha then + COMMENT luminance from the biggest to the smallest bits. FIELD field_5003 hasBlue Z FIELD field_5004 hasGreen Z FIELD field_5005 hasRed Z - FIELD field_5006 alphaChannelOffset I - FIELD field_5007 luminanceChannelOffset I + FIELD field_5006 alphaOffset I + FIELD field_5007 luminanceOffset I FIELD field_5008 blueOffset I FIELD field_5009 greenOffset I FIELD field_5010 redOffset I METHOD (Ljava/lang/String;IIIZZZZZIIIIIZ)V - ARG 3 channels + ARG 3 channelCount ARG 4 glFormat ARG 5 hasRed ARG 6 hasGreen @@ -210,34 +250,41 @@ CLASS net/minecraft/class_1011 net/minecraft/client/texture/NativeImage METHOD method_35632 getRedOffset ()I METHOD method_35633 getGreenOffset ()I METHOD method_35634 getBlueOffset ()I - METHOD method_35635 getLuminanceChannelOffset ()I + METHOD method_35635 getLuminanceOffset ()I METHOD method_35636 hasRedChannel ()Z METHOD method_35637 hasGreenChannel ()Z METHOD method_35638 hasBlueChannel ()Z - METHOD method_35639 getRedOrLuminanceOffset ()I - METHOD method_35640 getGreenOrLuminanceOffset ()I - METHOD method_35641 getBlueOrLuminanceOffset ()I - METHOD method_4329 hasAlphaChannel ()Z - METHOD method_4330 getOpacityOffset ()I - METHOD method_4332 getAlphaChannelOffset ()I - METHOD method_4333 getPixelDataFormat ()I + METHOD method_35639 getRedChannelOffset ()I + METHOD method_35640 getGreenChannelOffset ()I + METHOD method_35641 getBlueChannelOffset ()I + METHOD method_4329 hasAlpha ()Z + METHOD method_4330 getOpacityChannelOffset ()I + COMMENT @apiNote For luminance-alpha format, this would return the luminance offset + COMMENT than the alpha offset. + METHOD method_4332 getAlphaOffset ()I + METHOD method_4333 toGl ()I METHOD method_4335 getChannelCount ()I - METHOD method_4336 getFormat (I)Lnet/minecraft/class_1011$class_1012; + METHOD method_4336 fromGl (I)Lnet/minecraft/class_1011$class_1012; ARG 0 glFormat METHOD method_4337 hasOpacityChannel ()Z METHOD method_4338 isWriteable ()Z METHOD method_4339 setPackAlignment ()V METHOD method_4340 setUnpackAlignment ()V - CLASS class_1013 GLFormat - FIELD field_5011 BGR Lnet/minecraft/class_1011$class_1013; - FIELD field_5012 ABGR Lnet/minecraft/class_1011$class_1013; - FIELD field_5015 glConstant I + CLASS class_1013 InternalFormat + COMMENT Represents the internal formats sent to {@code glTexImage2D}, representing the + COMMENT number of color channels present in an image to prepare. + COMMENT + COMMENT @see Base Internal Formats + COMMENT @see com.mojang.blaze3d.platform.TextureUtil#prepareImage(InternalFormat, int, int, int, int) + FIELD field_5015 value I METHOD (Ljava/lang/String;II)V - ARG 3 glConstant - METHOD method_4341 getGlConstant ()I + ARG 3 value + METHOD method_4341 getValue ()I CLASS class_1014 WriteCallback FIELD field_5018 channel Ljava/nio/channels/WritableByteChannel; FIELD field_5019 exception Ljava/io/IOException; + METHOD (Ljava/nio/channels/WritableByteChannel;)V + ARG 1 channel METHOD invoke (JJI)V ARG 1 context ARG 3 data From 80a35594f5c97962896df6a76e7e225a2a1ef09b Mon Sep 17 00:00:00 2001 From: deirn Date: Wed, 1 Sep 2021 02:40:36 +0700 Subject: [PATCH 12/12] Add a note for where to get server's actual dynamic registry entries (#2649) --- .../net/minecraft/util/registry/BuiltinRegistries.mapping | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mappings/net/minecraft/util/registry/BuiltinRegistries.mapping b/mappings/net/minecraft/util/registry/BuiltinRegistries.mapping index fb8d1ece90..a10d7b0f5d 100644 --- a/mappings/net/minecraft/util/registry/BuiltinRegistries.mapping +++ b/mappings/net/minecraft/util/registry/BuiltinRegistries.mapping @@ -1,6 +1,13 @@ CLASS net/minecraft/class_5458 net/minecraft/util/registry/BuiltinRegistries COMMENT Stores a few hardcoded registries with builtin values for datapack-loadable registries, COMMENT from which a registry tracker can create a new dynamic registry. + COMMENT + COMMENT

Note that these registries do not contain the actual entries that the server has, + COMMENT for that you will need to access it from {@link net.minecraft.util.registry.DynamicRegistryManager}. + COMMENT + COMMENT @see net.minecraft.server.MinecraftServer#getRegistryManager() + COMMENT @see net.minecraft.client.network.ClientPlayNetworkHandler#getRegistryManager() + COMMENT @see net.minecraft.util.registry.DynamicRegistryManager#get(RegistryKey) FIELD field_25925 LOGGER Lorg/apache/logging/log4j/Logger; FIELD field_25926 REGISTRIES Lnet/minecraft/class_2378; FIELD field_25927 CONFIGURED_SURFACE_BUILDER Lnet/minecraft/class_2378;