DamageSource Is Not Null
by vomiter
DamageSource Is Not Null is a safety guard that stops damage events without a source from crashing a server or interrupting gameplay.
What it does
The mod injects checks into the code that handles living entities taking damage and dying. When a damage event arrives without a valid source, the mod swaps in a fallback generic DamageSource, so the event can finish instead of throwing a NullPointerException. Without such a guard, these errors can kill a server or interrupt play for reasons a player cannot control. The mod works as a runtime safety net for those cases, and it prints detailed logs that help modpack authors find the mod that sent the bad event.
The guard covers the hurt and die paths of LivingEntity and the LivingDeathEvent source. Version 2.0.0 closed several loopholes in the original guard and added commands for testing and diagnosing damage source problems on a running server. Those internal safety and debugging changes were later carried over to other supported versions of Forge, Fabric and Minecraft. The mod is released under the MIT License, and it is not open source.
Key features
Fallback damage source
A damage event that arrives without a source is given a generic fallback DamageSource, so the event completes.
Detailed culprit logs
Logs record details of the faulty damage event, which helps locate the mod that triggered it.
Diagnostic command tools
Commands added in version 2.0.0 test and diagnose damage source issues on a running server.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Use cases
Large modpacks
Modpack authors can run the guard to find which mod sends damage events without a source, without crashing the server.
Server stability
Server owners can keep a server running when a faulty mod sends damage events that would otherwise crash it.
Who it’s for: The mod suits modpack authors who need to locate problematic mods and server owners who want a safety net against damage source errors.
Questions
Does DamageSource Is Not Null need to be on both sides?
Which loaders and versions does the mod support?
Which version should a modpack use?
In the catalog
DamageSource Is Not Null is one of 29,952 Game mechanics mods on ModsFinder, and one of 13,316 Game mechanics mods for Forge. 32,366 mods support Minecraft 1.21.1.
More from vomiter
Similar mods
What the author says
Tired of crashes caused by mods passing a null DamageSource into Minecraft's damage or death pipeline? It adds runtime guards to several common damage/death paths so that many invalid DamageSource cases can be caught before they crash the game. It can also log useful information to help identify the offending mod.
Official listing
- Modrinth page
- modrinth.com/mod/damagesource-is-not-null
- Owner
- vomiter
- Published
- 2026-01-24
- Updated on Modrinth
- 2026-03-05
- Facts verified
- 2026-10-15
