aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-05 16:20:01 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-05 16:20:01 +0200
commit0d284cf02fb68873212e5b394ebeb3509370cbfb (patch)
tree635bac8dee24890ec58f5a2aa53462b56891359f /src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
parent69564669dba7bd147d94d4dd68e32ab07bc64ce0 (diff)
downloadskyhanni-0d284cf02fb68873212e5b394ebeb3509370cbfb.tar.gz
skyhanni-0d284cf02fb68873212e5b394ebeb3509370cbfb.tar.bz2
skyhanni-0d284cf02fb68873212e5b394ebeb3509370cbfb.zip
Added Lava Maze
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
index 531cc59b1..fd74c5d0c 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt
@@ -89,15 +89,14 @@ class ParkourHelper(
val nextShortcuts = current until current + lookAhead
for (shortCut in shortCuts) {
if (shortCut.from in nextShortcuts && shortCut.to in locations.indices) {
- event.draw3DLine(
- locations[shortCut.from].offsetCenter(),
- locations[shortCut.to].offsetCenter(),
- Color.RED,
- 3,
- false
- )
- event.drawFilledBoundingBox(axisAlignedBB(locations[shortCut.to]), Color.RED, 1f)
- event.drawDynamicText(locations[shortCut.to].add(-0.5, 1.0, -0.5), "§cShortcut", 2.5)
+ val from = locations[shortCut.from].offsetCenter()
+ val to = locations[shortCut.to].offsetCenter()
+ event.draw3DLine(from, to, Color.RED, 3, false)
+
+ val aabb = axisAlignedBB(locations[shortCut.to])
+ event.drawFilledBoundingBox(aabb, Color.RED, 1f)
+ val textLocation = from.add(to.subtract(from).normalize())
+ event.drawDynamicText(textLocation.add(-0.5, 1.0, -0.5), "§cShortcut", 1.8)
}
}