diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-05-26 22:26:24 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-26 14:26:24 +0200 |
commit | 0ddd9edc94bc0c872109acd0b845163b073ceb6a (patch) | |
tree | e8cad5d9d86105dfce6809489c9f6409a3a5ffc2 /src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt | |
parent | 573e8452bf2e9a3e1ca94f736c2b441796ad4b92 (diff) | |
download | skyhanni-0ddd9edc94bc0c872109acd0b845163b073ceb6a.tar.gz skyhanni-0ddd9edc94bc0c872109acd0b845163b073ceb6a.tar.bz2 skyhanni-0ddd9edc94bc0c872109acd0b845163b073ceb6a.zip |
Backend: Use less deprecated LorenzVec functions (#1556)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt index 2e4f16ba6..658118bcb 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt @@ -99,7 +99,7 @@ class ParkourHelper( val from = locations[shortCut.from].offsetCenter() val to = locations[shortCut.to].offsetCenter() event.draw3DLine_nea(from, to, Color.RED, 3, false) - val textLocation = from.add(to.subtract(from).normalize()) + val textLocation = from + (to - from).normalize() event.drawDynamicText(textLocation.add(-0.5, 1.0, -0.5), "§cShortcut", 1.8) val aabb = axisAlignedBB(locations[shortCut.to]) @@ -141,10 +141,10 @@ class ParkourHelper( if (LocationUtils.playerLocation().distance(nextPosition) > currentPosition.distance(nextPosition)) return null val factor = LocationUtils.playerLocation().distance(currentPosition) / currentPosition.distance(nextPosition) - val solpeLocation = lookAheadStart.slope(lookAheadEnd, factor) + val slopeLocation = lookAheadStart.slope(lookAheadEnd, factor) return Pair( IndexedValue(current + lookAhead - 1, lookAheadStart), - IndexedValue(current + lookAhead, solpeLocation) + IndexedValue(current + lookAhead, slopeLocation) ) } |