diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt | 3 |
1 files changed, 3 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 efcc8e493..510f631b6 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.utils import net.minecraft.client.Minecraft +import net.minecraft.entity.Entity object LocationUtils { @@ -12,6 +13,8 @@ object LocationUtils { fun LorenzVec.distanceToPlayer() = distance(playerLocation()) + fun Entity.distanceToPlayer() = getLorenzVec().distance(playerLocation()) + fun playerEyeLocation(): LorenzVec { val player = Minecraft.getMinecraft().thePlayer val vec = player.getLorenzVec() |