
Passing `null` as damage source
SiverDX opened this issue ยท 0 comments
See Octo-Studios/reliquified-lenders-cataclysm#3 (comment)
If mods don't crash the game from the event itself then vanilla will do it for them since there is no null
check here
public void die(DamageSource damageSource) {
if (net.neoforged.neoforge.common.CommonHooks.onLivingDeath(this, damageSource)) return;
if (!this.isRemoved() && !this.dead) {
Entity entity = damageSource.getEntity();
LivingEntity livingentity = this.getKillCredit();
if (this.deathScore >= 0 && livingentity != null) {
livingentity.awardKillScore(this, this.deathScore, damageSource);
}