diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-05 11:34:40 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-05 11:34:40 +0100 |
commit | 3504ea84c69e38943f42ae006596f0b46cbf005e (patch) | |
tree | ae8e963284cf90bd20c314ccd636537b8ad8549b /src/main/java/at/hannibal2/skyhanni/features/cosmetics | |
parent | 62f4d8cd10210ea255860f37ffde62180d3400fe (diff) | |
download | skyhanni-3504ea84c69e38943f42ae006596f0b46cbf005e.tar.gz skyhanni-3504ea84c69e38943f42ae006596f0b46cbf005e.tar.bz2 skyhanni-3504ea84c69e38943f42ae006596f0b46cbf005e.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/cosmetics')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt index 022ec07b9..9e77ab6e4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt @@ -54,15 +54,15 @@ class CosmeticFollowingLine { val last7 = locations.keys.toList().takeLast(7) val last2 = locations.keys.toList().takeLast(2) - for ((a, b) in locations.keys.zipWithNext()) { + locations.keys.zipWithNext { a, b -> val locationSpot = locations[b]!! if (firstPerson && !locationSpot.onGround && b in last7) { // Do not render the line in the face, keep more distance while the line is in the air - continue + return } if (b in last2 && locationSpot.time.passedSince() < 400.milliseconds) { // Do not render the line directly next to the player, prevent laggy design - continue + return } event.draw3DLine(a, b, color, locationSpot.getWidth(), !config.behindBlocks) } @@ -81,7 +81,8 @@ class CosmeticFollowingLine { private fun renderClose(event: LorenzRenderWorldEvent, firstPerson: Boolean, color: Color) { if (firstPerson && latestLocations.any { !it.value.onGround }) return - for ((a, b) in latestLocations.keys.zipWithNext()) { + + latestLocations.keys.zipWithNext { a, b -> val locationSpot = latestLocations[b]!! event.draw3DLine(a, b, color, locationSpot.getWidth(), !config.behindBlocks) } |