diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-03-23 06:56:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-23 06:56:27 +0100 |
commit | f43775c7e097cdbc5ec2a63fb2edfc231922eefa (patch) | |
tree | dd9459d2187cfd699af923e1e927628fc9f8cb8d /src/main/java/at/hannibal2 | |
parent | f627fe47c90d85e223d5154fe86c0c88e06c27f1 (diff) | |
download | skyhanni-f43775c7e097cdbc5ec2a63fb2edfc231922eefa.tar.gz skyhanni-f43775c7e097cdbc5ec2a63fb2edfc231922eefa.tar.bz2 skyhanni-f43775c7e097cdbc5ec2a63fb2edfc231922eefa.zip |
Fix: Lane Switch again (#1241)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt index 42308466b..671f34606 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt @@ -28,7 +28,7 @@ class MovementSpeedDisplay { } private fun checkSpeed() { - if (!isEnabled()) return + if (!LorenzUtils.onHypixel) return speedInLastTick = with(Minecraft.getMinecraft().thePlayer) { val oldPos = LorenzVec(prevPosX, prevPosY, prevPosZ) @@ -37,7 +37,9 @@ class MovementSpeedDisplay { // Distance from previous tick, multiplied by TPS oldPos.distance(newPos) * 20 } - display = "Movement Speed: ${speedInLastTick.round(2)}" + if (isEnabled()) { + display = "Movement Speed: ${speedInLastTick.round(2)}" + } } @SubscribeEvent |