aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
index bf7a0f1ee..1c1bd5b1b 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
@@ -16,6 +16,8 @@ object LocationUtils {
fun Entity.distanceToPlayer() = getLorenzVec().distance(playerLocation())
+ fun Entity.distanceTo(location: LorenzVec) = getLorenzVec().distance(location)
+
fun playerEyeLocation(): LorenzVec {
val player = Minecraft.getMinecraft().thePlayer
val vec = player.getLorenzVec()