fix: attack key not working properly for mobs

This commit is contained in:
Martin Prokoph
2025-10-01 16:54:24 +02:00
parent 7660f6b0ee
commit 15e1b08e8f

View File

@@ -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());