Skip to content

Commit

Permalink
fix(keybindings): make proguard happy
Browse files Browse the repository at this point in the history
  • Loading branch information
rvbsm committed Oct 26, 2024
1 parent 4fe3b80 commit 5add916
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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();
}
}

0 comments on commit 5add916

Please sign in to comment.