use wasPressed() for better detection

This commit is contained in:
Oth3r 2024-07-27 14:57:59 -05:00
commit 3f008635f0

View file

@ -36,8 +36,7 @@ public class Events {
} }
private static void loopLogic(ClientPlayerEntity player) { private static void loopLogic(ClientPlayerEntity player) {
while (toggle_key.isPressed()) { while (toggle_key.wasPressed()) {
toggle_key.setPressed(false);
if (Data.isInGame()) { if (Data.isInGame()) {
// todo move to logic.java // todo move to logic.java
if (Data.isSupportedServer()) { if (Data.isSupportedServer()) {