Username Logger crash
rayzr522 opened this issue ยท 1 comments
SecurityCraft has been crashing due to an odd glitch with the username logger. Sometimes when a mob gets near to it, my game crashes. Based on the crash, and after looking through your code for a few minutes, I found the problem. It's in TileEntitySCTE.func_145845_h()
at line 113 where it calls attackEntity(mobToAttack)
. TileEntityLogger.attackEntity(Entity entity)
casts the parameter entity
to EntityPlayer
without checking. I assume that this is only supposed to be called on players, but for some reason I've had this happen so far with two mobs from Mutant Creatures (Creeper Minion, and Creeper Minion Egg), and also with my wife from MCA.
It's quite annoying because I can't figure out how to reproduce it. I'm not quite sure what the exact circumstances are.
I'd attach a crash log if I knew of one where it happened, but it goes along the lines of (Mutant Creatures package).CreeperMinon cannot be cast to (Minecraft entity package).EntityPlayer
Currently the only solution I've found is to open the world in MCEdit and delete whatever entities is crashing it. If I don't, the game crashes on world load.
Not the most urgent problem, but quite annoying. I'd appreciate if this could be fixed.
Please check the changelog first before reporting issues.
https://github.com/Geforce132/SecurityCraft/blob/master/Changelog%20v1.8.x.md
First fix.