QuiltMC / quilt-mappings

Quilt's Mappings for Minecraft
Creative Commons Zero v1.0 Universal
90 stars 71 forks source link

Fix the key bind category unpick #583

Closed EnnuiL closed 2 months ago

EnnuiL commented 2 months ago

This fixes redundancy as well as its omission on the StickyKeyBind init method

OroArmor commented 2 months ago
diff -bur namedTargetSrc/net/minecraft/client/option/GameOptions.java namedSrc/net/minecraft/client/option/GameOptions.java
--- namedTargetSrc/net/minecraft/client/option/GameOptions.java 2024-04-19 20:44:47.943995672 +0000
+++ namedSrc/net/minecraft/client/option/GameOptions.java   2024-04-19 20:43:33.823503392 +0000
@@ -954,7 +954,7 @@
     * @mapping {@literal hashed f_knzdqwii Lnet/minecraft/unmapped/C_lscptbhn;f_knzdqwii:Lnet/minecraft/unmapped/C_sygikzty;}
     * @mapping {@literal named sneakKey Lnet/minecraft/client/option/GameOptions;sneakKey:Lnet/minecraft/client/option/KeyBind;}
     */
-   public final KeyBind sneakKey = new StickyKeyBind("key.sneak", GLFW.GLFW_KEY_LEFT_SHIFT, "key.categories.movement", this.toggleableSneak::get);
+   public final KeyBind sneakKey = new StickyKeyBind("key.sneak", GLFW.GLFW_KEY_LEFT_SHIFT, KeyBind.MOVEMENT_CATEGORY, this.toggleableSneak::get);
    /**
     * A key bind for sprinting.
     * Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_LEFT_CONTROL the left control key} by default.
@@ -962,7 +962,7 @@
     * @mapping {@literal hashed f_gficlocu Lnet/minecraft/unmapped/C_lscptbhn;f_gficlocu:Lnet/minecraft/unmapped/C_sygikzty;}
     * @mapping {@literal named sprintKey Lnet/minecraft/client/option/GameOptions;sprintKey:Lnet/minecraft/client/option/KeyBind;}
     */
-   public final KeyBind sprintKey = new StickyKeyBind("key.sprint", GLFW.GLFW_KEY_LEFT_CONTROL, "key.categories.movement", this.toggleableSprint::get);
+   public final KeyBind sprintKey = new StickyKeyBind("key.sprint", GLFW.GLFW_KEY_LEFT_CONTROL, KeyBind.MOVEMENT_CATEGORY, this.toggleableSprint::get);
    /**
     * A key bind for opening {@linkplain net.minecraft.client.gui.screen.ingame.InventoryScreen the inventory screen}.
     * Bound to {@linkplain org.lwjgl.glfw.GLFW#GLFW_KEY_E the E key} by default.
OroArmor commented 2 months ago

Extremely minor change, merging now