diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-04-27 20:17:12 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-27 12:17:12 +0200 |
commit | d674606e0454239bc610330be923486efb19a93b (patch) | |
tree | 58ed819bc2ea3430f222002d10499c01c80e605f /src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt | |
parent | cc27e7f7a8b88fe4ce5fc989f23015bdce626452 (diff) | |
download | skyhanni-d674606e0454239bc610330be923486efb19a93b.tar.gz skyhanni-d674606e0454239bc610330be923486efb19a93b.tar.bz2 skyhanni-d674606e0454239bc610330be923486efb19a93b.zip |
Fix: Various SkyHanniRenderEntityEvent things (#1555)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt index 494fe1efa..70fdb6c4e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt @@ -182,14 +182,6 @@ object EntityUtils { fun getEntityByID(entityId: Int) = Minecraft.getMinecraft()?.thePlayer?.entityWorld?.getEntityByID(entityId) @SubscribeEvent - fun onEntityRender(event: RenderLivingEvent<*>) { - val shEvent = SkyHanniRenderEntityEvent(event.entity, event.renderer, event.x, event.y, event.z) - if (shEvent.postAndCatch()) { - event.cancel() - } - } - - @SubscribeEvent fun onEntityRenderPre(event: RenderLivingEvent.Pre<*>) { val shEvent = SkyHanniRenderEntityEvent.Pre(event.entity, event.renderer, event.x, event.y, event.z) if (shEvent.postAndCatch()) { @@ -199,10 +191,7 @@ object EntityUtils { @SubscribeEvent fun onEntityRenderPost(event: RenderLivingEvent.Post<*>) { - val shEvent = SkyHanniRenderEntityEvent.Post(event.entity, event.renderer, event.x, event.y, event.z) - if (shEvent.postAndCatch()) { - event.cancel() - } + SkyHanniRenderEntityEvent.Post(event.entity, event.renderer, event.x, event.y, event.z) } @SubscribeEvent @@ -215,10 +204,7 @@ object EntityUtils { @SubscribeEvent fun onEntityRenderSpecialsPost(event: RenderLivingEvent.Specials.Post<*>) { - val shEvent = SkyHanniRenderEntityEvent.Specials.Post(event.entity, event.renderer, event.x, event.y, event.z) - if (shEvent.postAndCatch()) { - event.cancel() - } + SkyHanniRenderEntityEvent.Specials.Post(event.entity, event.renderer, event.x, event.y, event.z) } fun EntityLivingBase.isCorrupted() = baseMaxHealth == health.toInt().derpy() * 3 || isRunicAndCorrupt() |