diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-30 20:03:45 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-30 20:03:45 +0100 |
commit | 8b4639f923185f3bbe693805303047ce24eaa238 (patch) | |
tree | 8d599603a9e078483c008dd17f19ab5878b565bb /src/main/java/at/hannibal2/skyhanni/utils | |
parent | 572e159de71827c5c8a6433de90adba2ebec5c4a (diff) | |
download | skyhanni-8b4639f923185f3bbe693805303047ce24eaa238.tar.gz skyhanni-8b4639f923185f3bbe693805303047ce24eaa238.tar.bz2 skyhanni-8b4639f923185f3bbe693805303047ce24eaa238.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt index f1d0544a2..7fe6e8efb 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt @@ -156,10 +156,5 @@ object EntityUtils { fun Entity.canBeSeen(radius: Double = 150.0) = getLorenzVec().add(y = 0.5).canBeSeen(radius) - fun getEntityByID(id: Int): Entity? { - val minecraft = Minecraft.getMinecraft() ?: return null - val world = minecraft.theWorld ?: return null - if (minecraft.thePlayer == null) return null - return world.getEntityByID(id) - } + fun getEntityByID(entityId: Int) = Minecraft.getMinecraft()?.thePlayer?.entityWorld?.getEntityByID(entityId) } |