diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-05 17:21:22 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-05 17:21:22 +0200 |
| commit | e041b9205fed5b550a5e3e2986d68def6d14b6ca (patch) | |
| tree | bcf40f611c69eec4be545f6f2ed87a9d98ebb352 /src/main/java/at/hannibal2/skyhanni/utils | |
| parent | 35f90f67e6e5c4f5a395e4ce9335388c998cde38 (diff) | |
| download | skyhanni-e041b9205fed5b550a5e3e2986d68def6d14b6ca.tar.gz skyhanni-e041b9205fed5b550a5e3e2986d68def6d14b6ca.tar.bz2 skyhanni-e041b9205fed5b550a5e3e2986d68def6d14b6ca.zip | |
using ParkourHelper for TubulatorParkour
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 |
