Bug: Toggle Sprint/Sneak bug
Androser420 opened this issue ยท 0 comments
Describe the bug
I just found a reason as to why Toggle Sprint and Sneak were conflicting.
Basically, whenever i tried to turn on Toggle Sprint it wouldn't work, but when I turned Toggle Sneak option on then they would both be activated in the same time instead of being seperate.
This issue went unnoticed for a while and I remember having it back in 1.19 so I decided to fix it myself.
Dumb solution:
- Change the line 91 in MidnightControls/src/main/java/eu/midnightdust/midnightcontrols/client/controller/ButtonBinding.java from
.actions(InputHandlers::handleToggleSprint).onlyInGame().register();
to:
.actions(InputHandlers::handleToggleSprint).onlyInGame().cooldown().register();
- Change lines 323 and 328 in MidnightControls/src/main/java/eu/midnightdust/midnightcontrols/client/controller/InputHandlers.java from
else if (MidnightControlsConfig.controllerToggleSneak != sprintToggled)
to:
else if (MidnightControlsConfig.controllerToggleSprint != sprintToggled)
I compiled the code, tested it myself and it worked flawlessly for me.