From e0be6a8c68ed258e4ca253b6b80436bad0a9c6f8 Mon Sep 17 00:00:00 2001 From: xia-mc <2052472631@qq.com> Date: Wed, 3 Jul 2024 23:14:10 +0800 Subject: [PATCH] small improve for fly --- src/main/java/keystrokesmod/module/impl/movement/Fly.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/keystrokesmod/module/impl/movement/Fly.java b/src/main/java/keystrokesmod/module/impl/movement/Fly.java index 8fe214cc..5bb5ff18 100644 --- a/src/main/java/keystrokesmod/module/impl/movement/Fly.java +++ b/src/main/java/keystrokesmod/module/impl/movement/Fly.java @@ -37,6 +37,7 @@ public class Fly extends Module { private long balance = 0; private long startTime = -1; private Timer.BalanceState balanceState = Timer.BalanceState.NONE; + private long lastReport = -1; public Fly() { super("Fly", category.movement); @@ -219,11 +220,17 @@ public void onRenderTick(TickEvent.RenderTickEvent e) { if ((int) mode.getInput() == 5) { final long curTime = System.currentTimeMillis(); + + if (System.currentTimeMillis() - lastReport > 1000) { + lastReport = System.currentTimeMillis(); + Utils.sendMessage(balance + ".0"); + } switch (balanceState) { case NONE: startTime = curTime; Utils.getTimer().timerSpeed = 0; balanceState = Timer.BalanceState.SLOW; + lastReport = System.currentTimeMillis(); break; case SLOW: balance += curTime - startTime;