diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-15 20:37:56 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-15 20:37:56 +0200 |
commit | e43d1b9e5debae6fb9b75134f3e708e8baa83ea1 (patch) | |
tree | 178ebd0d1b33430918e3788219464185b3d48305 /src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt | |
parent | ebdeedb91341e2c111dfac6b73860abf04839f67 (diff) | |
download | skyhanni-e43d1b9e5debae6fb9b75134f3e708e8baa83ea1.tar.gz skyhanni-e43d1b9e5debae6fb9b75134f3e708e8baa83ea1.tar.bz2 skyhanni-e43d1b9e5debae6fb9b75134f3e708e8baa83ea1.zip |
Used distanceToPlayer
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt index eee60ea02..34cdc4d6c 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt @@ -8,9 +8,9 @@ object LocationUtils { return Minecraft.getMinecraft().theWorld.rayTraceBlocks(a.toVec3(), b.toVec3()) == null } - fun playerLocation(): LorenzVec { - return Minecraft.getMinecraft().thePlayer.getLorenzVec() - } + fun playerLocation() = Minecraft.getMinecraft().thePlayer.getLorenzVec() + + fun LorenzVec.distanceToPlayer() = distance(playerLocation()) fun playerEyeLocation(): LorenzVec { val player = Minecraft.getMinecraft().thePlayer |