From 15e1b08e8f4e5b93c3b12246c65921de760463d9 Mon Sep 17 00:00:00 2001 From: Martin Prokoph Date: Wed, 1 Oct 2025 16:54:24 +0200 Subject: [PATCH] fix: attack key not working properly for mobs --- .../midnightcontrols/client/controller/PressAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/eu/midnightdust/midnightcontrols/client/controller/PressAction.java b/common/src/main/java/eu/midnightdust/midnightcontrols/client/controller/PressAction.java index 24888e8..21d80bd 100644 --- a/common/src/main/java/eu/midnightdust/midnightcontrols/client/controller/PressAction.java +++ b/common/src/main/java/eu/midnightdust/midnightcontrols/client/controller/PressAction.java @@ -28,7 +28,7 @@ public interface PressAction { if (action == ButtonState.REPEAT || client.currentScreen != null) return false; button.asKeyBinding().ifPresent(binding -> { - if (binding instanceof StickyKeyBinding) + if (binding instanceof StickyKeyBinding && binding != client.options.attackKey) // TODO: Properly fix sticky keys so the attack key doesn't need to be a hardcoded exception binding.setPressed(button.isPressed()); else ((KeyBindingAccessor) binding).midnightcontrols$handlePressState(button.isPressed());