In a self-created modpack I came recently across a strange bug:
I am using the Dissolution mod which allows players after death to possess hostile mob's bodies.
The problem is that for checking whether the debug glass is equipped in DebugOverlayHandler.java:73 you're casting the render view entity to an EntityPlayer. But other mods such as Dissolution are not forced to extend EntityPlayer so the game crashes with a message like this:
java.lang.ClassCastException: ladysnake.dissolution.common.entity.minion.EntityMinionZombie cannot be cast to net.minecraft.entity.player.EntityPlayer
at oortcloud.hungryanimals.items.gui.DebugOverlayHandler.onUpdate(DebugOverlayHandler.java:75)
Maybe you could firstly check whether it extends or even better if possible you could use an alternate class such as EntityMob (i'm not quite sure whether this class provides getHeldItem()).
In a self-created modpack I came recently across a strange bug:
I am using the Dissolution mod which allows players after death to possess hostile mob's bodies.
The problem is that for checking whether the debug glass is equipped in DebugOverlayHandler.java:73 you're casting the render view entity to an
EntityPlayer
. But other mods such as Dissolution are not forced to extendEntityPlayer
so the game crashes with a message like this:Maybe you could firstly check whether it extends or even better if possible you could use an alternate class such as
EntityMob
(i'm not quite sure whether this class providesgetHeldItem()
).