Fix autowalk keybind delay

This commit is contained in:
zontreck 2023-12-23 23:41:56 -07:00
parent dcd501062d
commit f9652bf382

View file

@ -22,7 +22,7 @@ public class AutoWalk {
@SubscribeEvent @SubscribeEvent
public static void onKeyPress(InputEvent.Key event) { public static void onKeyPress(InputEvent.Key event) {
if(Keybindings.AUTOWALK.matches(event.getKey(), event.getScanCode()) && Minecraft.getInstance().screen == null && lastPress+5 < Instant.now().getEpochSecond() && Keybindings.AUTOWALK.isDown()) if(Keybindings.AUTOWALK.matches(event.getKey(), event.getScanCode()) && Minecraft.getInstance().screen == null && Keybindings.AUTOWALK.isDown())
{ {
lastPress = Instant.now().getEpochSecond(); lastPress = Instant.now().getEpochSecond();
if(isWalking) if(isWalking)