aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
index 3fe7f6973..7a780c3b5 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
@@ -53,10 +53,8 @@ class ParkourHelper(
if (visible) {
for ((index, location) in locations.withIndex()) {
- if (location.offsetCenter().distanceToPlayer() < detectionRange) {
- if (Minecraft.getMinecraft().thePlayer.onGround) {
- current = index
- }
+ if (location.offsetCenter().distanceToPlayer() < detectionRange && Minecraft.getMinecraft().thePlayer.onGround) {
+ current = index
}
}
}
@@ -64,10 +62,8 @@ class ParkourHelper(
val distanceToPlayer = locations.first().offsetCenter().distanceToPlayer()
if (distanceToPlayer < detectionRange) {
visible = true
- } else if (distanceToPlayer > 15) {
- if (current < 1) {
- visible = false
- }
+ } else if (distanceToPlayer > 15 && current < 1) {
+ visible = false
}
if (!visible) return
@@ -117,10 +113,8 @@ class ParkourHelper(
event.drawFilledBoundingBox_nea(aabb, colorForIndex(index), 1f)
if (outline) event.outlineTopFace(aabb, 2, Color.BLACK, true)
}
- if (SkyHanniMod.feature.dev.waypoint.showPlatformNumber) {
- if (!isMovingPlatform) {
- event.drawString(location.offsetCenter().add(0, 1, 0), "§a§l$index", seeThroughBlocks = true)
- }
+ if (SkyHanniMod.feature.dev.waypoint.showPlatformNumber && !isMovingPlatform) {
+ event.drawString(location.offsetCenter().add(0, 1, 0), "§a§l$index", seeThroughBlocks = true)
}
}
} catch (e: Throwable) {