
NPE: LivingEntity#die should not be called with null
Vonr opened this issue ยท 3 comments
This can cause crashes downstream in mods listening to entity death events such as in FTB-Quests, for which I have also filed a fix (FTBTeam/FTB-Quests#773) in the form of a defensive check.
It will also crash even if there are no mods listening to entity death events if the killed LivingEntity
is not already removed and not already dead, as LivingEntity#die
calls damageSource.getEntity()
which will cause an NPE as well. The event just happens to be fired before that.