diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-03-22 21:41:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 21:41:48 +0100 |
commit | a82b6f8d2567cc68a97128180bc75997da3daf32 (patch) | |
tree | 4c1548910e0f5a6d9e6502679bbe949106daa128 /src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt | |
parent | 37ba2ec0f6e0340b29656ec0f43b36f52d27d0d5 (diff) | |
download | skyhanni-a82b6f8d2567cc68a97128180bc75997da3daf32.tar.gz skyhanni-a82b6f8d2567cc68a97128180bc75997da3daf32.tar.bz2 skyhanni-a82b6f8d2567cc68a97128180bc75997da3daf32.zip |
Fix: Lane Detection (#1239)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt index 24b84dd7f..29cc1d569 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt @@ -1,6 +1,5 @@ package at.hannibal2.skyhanni.utils -import at.hannibal2.skyhanni.utils.LorenzUtils.round import net.minecraft.client.Minecraft import net.minecraft.entity.Entity import net.minecraft.util.AxisAlignedBB @@ -12,13 +11,6 @@ object LocationUtils { fun playerLocation() = Minecraft.getMinecraft().thePlayer.getLorenzVec() - fun distanceFromPreviousTick(): Double = with(Minecraft.getMinecraft().thePlayer) { - val oldPos = LorenzVec(prevPosX, prevPosY, prevPosZ) - val newPos = LorenzVec(posX, posY, posZ) - - (oldPos.distance(newPos) * 20).round(2) - } - fun LorenzVec.distanceToPlayer() = distance(playerLocation()) fun LorenzVec.distanceToPlayerIgnoreY() = distanceIgnoreY(playerLocation()) |