diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt index 1c663ac52..73a529cbc 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt @@ -51,6 +51,16 @@ class ParkourHelper( if (!showEverything) { if (current == locations.size - 1) visible = false + if (visible) { + for ((index, location) in locations.withIndex()) { + if (location.offsetCenter().distanceToPlayer() < detectionRange) { + if (Minecraft.getMinecraft().thePlayer.onGround) { + current = index + } + } + } + } + val distanceToPlayer = locations.first().offsetCenter().distanceToPlayer() if (distanceToPlayer < detectionRange) { visible = true @@ -62,14 +72,6 @@ class ParkourHelper( if (!visible) return - for ((index, location) in locations.withIndex()) { - if (location.offsetCenter().distanceToPlayer() < detectionRange) { - if (Minecraft.getMinecraft().thePlayer.onGround) { - current = index - } - } - } - if (current < 0) return } else { current = 0 |
