An attempt to fix "NullPointerException: LivingDeathEvent.getSource() is null"
LivingDeathEvent.getSource() is null
Tired of random crashes caused by broken mods passing null DamageSource into entity death or damage events?
This mod adds a defensive guard to Minecraft’s damage & death pipeline, preventing servers and single-player worlds from crashing due to invalid DamageSource usage by other mods.
Instead of crashing your game, it will:
So you can keep playing, and fix the real issue later.
This mod injects safety checks into:
LivingEntity#hurtLivingEntity#dieIf a mod incorrectly triggers damage or death with a null DamageSource (which should never happen), this mod will:
While vanilla and NeoForge expect DamageSource to never be null,
some mods still trigger events incorrectly and crash the entire game.
Normally, this results in errors like:
LivingDeathEvent.getSource() is null
Which kills servers and corrupts worlds for reasons outside the player's control.
This mod acts as a runtime safety net for such situations.
If you're a modpack author or server owner, this mod can help:
Think of it as a circuit breaker for bad damage events.
MIT License — free to use in any modpack.