From 5add916483031dabb498e424170b72bab97be4ce Mon Sep 17 00:00:00 2001 From: Ruslan Mykhailenko Date: Sat, 26 Oct 2024 09:17:50 +0300 Subject: [PATCH] fix(keybindings): make proguard happy --- .../java/dev/rvbsm/fsit/mixin/client/KeyBindingMixin.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/java/dev/rvbsm/fsit/mixin/client/KeyBindingMixin.java b/src/client/java/dev/rvbsm/fsit/mixin/client/KeyBindingMixin.java index a59195b..2b06839 100644 --- a/src/client/java/dev/rvbsm/fsit/mixin/client/KeyBindingMixin.java +++ b/src/client/java/dev/rvbsm/fsit/mixin/client/KeyBindingMixin.java @@ -1,7 +1,7 @@ package dev.rvbsm.fsit.mixin.client; import com.llamalad7.mixinextras.sugar.Local; -import dev.rvbsm.fsit.client.option.HybridKeyBinding; +import dev.rvbsm.fsit.client.event.KeyBindingsListenerKt; import net.minecraft.client.option.KeyBinding; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -10,10 +10,8 @@ @Mixin(KeyBinding.class) public abstract class KeyBindingMixin { - @Inject(method = "untoggleStickyKeys", at = @At(value = "CONSTANT", args = "classValue=net/minecraft/client/option/StickyKeyBinding")) + @Inject(method = "untoggleStickyKeys", at = @At("TAIL")) private static void untoggleHybridKeys(CallbackInfo ci, @Local KeyBinding keyBinding) { - if (keyBinding instanceof HybridKeyBinding hybridKeyBinding) { - hybridKeyBinding.untoggle$fsit_client(); - } + KeyBindingsListenerKt.untoggleKeyBindings(); } }