From 0ddd9edc94bc0c872109acd0b845163b073ceb6a Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Sun, 26 May 2024 22:26:24 +1000 Subject: Backend: Use less deprecated LorenzVec functions (#1556) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt') 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) ) } -- cgit