ModsFinder

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.

ForgeNeoForgeServer required, client optionalMIT License1.20.1 – 1.21.1

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

  1. Fallback damage source

    A damage event that arrives without a source is given a generic fallback DamageSource, so the event completes.

  2. Detailed culprit logs

    Logs record details of the faulty damage event, which helps locate the mod that triggered it.

  3. 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.

1.21.1Not available1.1.0
1.20.12.0.0-forge-1.20.1Not available
ReleaseBetaAlphaNot available

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?

No. It is server required and client optional, so the server must run it while players may leave it out.

Which loaders and versions does the mod support?

Files are published for Forge and NeoForge, with Forge 2.0.0 for 1.20.1 and NeoForge 1.1.0 for 1.21.1.

Which version should a modpack use?

Version 2.0.0 is the strongly recommended upgrade, as it closes loopholes and improves debugging tools, but its Forge build targets only 1.20.1.

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

All projects

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.
vomiter, on the Modrinth page

Official listing

Owner
vomiter
Published
2026-01-24
Updated on Modrinth
2026-03-05
Facts verified
2026-10-15

Tags