
NPE: Entity Living Base crash
erindal opened this issue ยท 7 comments
Crash report: https://gist.github.com/erindalc/7fa73eed29de3322c24122ee3fb65144
Version: 5.4.2
Forge: 14.23.4.2747
I was just walking around my base and I crashed. I had to enable forge's remove erroring entities to load back in.
I can't reproduce this, and can't imagine what might be going on here -- the vampire has no special jump or swim related code, that just defaults to vanilla. I really am starting to regret getting involved in with this mod, actually. Not sure when or if this will be fixed.
It's reproduced by spawning a vampire in water.
I think the Vampire is missing the SWIM_SPEED entity attribute, probably a missing ancestor call in the entity class.
Indeed, applyEntityAttributes is missing an ancestor call: https://github.com/Sunconure11/dungeon-mobs/blob/master/src/main/java/com/gw/dm/entity/EntityVampire.java#L54
From a quick code review, Revenant as the same issue here: https://github.com/Sunconure11/dungeon-mobs/blob/master/src/main/java/com/gw/dm/entity/EntityRevenant.java#L86
I didn't realize leaving that out would cause a problem since it didn't crash for me. For what its worth, I guessed from the name "handleJumpWater" that it might involve swimming (even though I'd see vampires run into water before) -- but when I went to test that by spawning vampires in water they just swam to the top with no crash or any sign of a problem.
Anyway, a new version was just uploaded and is under review -- it adds the super class call, so if that was it everything should be fixed.
Is this fixed or is this still happening? If it is no longer happening perhaps this should also be closed.