aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-22 13:11:48 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-22 13:11:48 +0100
commita6de55740355b3bc4d7c869626d22da5b3854416 (patch)
treefe28873ec430dc4be8beedd9c2738aaf2a1943b7 /src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
parent5c9cbdba458638ae962ccf92e750ebdcea718478 (diff)
downloadskyhanni-a6de55740355b3bc4d7c869626d22da5b3854416.tar.gz
skyhanni-a6de55740355b3bc4d7c869626d22da5b3854416.tar.bz2
skyhanni-a6de55740355b3bc4d7c869626d22da5b3854416.zip
reverted some private functions and other misc cleanup changes
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
index 2079408f7..e6929d737 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt
@@ -6,9 +6,8 @@ import net.minecraft.util.AxisAlignedBB
object LocationUtils {
- private fun canSee(a: LorenzVec, b: LorenzVec): Boolean {
- return Minecraft.getMinecraft().theWorld.rayTraceBlocks(a.toVec3(), b.toVec3(), false, true, false) == null
- }
+ fun canSee(a: LorenzVec, b: LorenzVec) =
+ Minecraft.getMinecraft().theWorld.rayTraceBlocks(a.toVec3(), b.toVec3(), false, true, false) == null
fun playerLocation() = Minecraft.getMinecraft().thePlayer.getLorenzVec()
@@ -28,7 +27,7 @@ object LocationUtils {
return vec.add(0.0, 0.0 + player.getEyeHeight(), 0.0)
}
- private fun AxisAlignedBB.isVecInside(vec: LorenzVec) = isVecInside(vec.toVec3())
+ fun AxisAlignedBB.isVecInside(vec: LorenzVec) = isVecInside(vec.toVec3())
fun AxisAlignedBB.isPlayerInside() = isVecInside(playerLocation())