CurseForge · Minecraft mod
DamageSource Is Not Null Basic
An attempt to solve DamageSource NPE (Only Covers Vanilla Mobs)
Quick answer
Which DamageSource Is Not Null Basic release should I use?
DamageSource Is Not Null Basic dsnnullbasic-3.1.2-neoforge-1.21.1.jar targets 1.21.1 with NeoForge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.
Where it goes
Is DamageSource Is Not Null Basic required on the client, server, or both?
The project page does not say whether this file belongs on the client, dedicated server, or both.
The source does not explicitly classify this release as client-only or server-only.
What else does DamageSource Is Not Null Basic dsnnullbasic-3.1.2-neoforge-1.21.1.jar need?
dsnnullbasic-3.1.2-neoforge-1.21.1.jar. Change the file and its required mods may change too.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add DamageSource Is Not Null Basic without breaking your instance.
Built for DamageSource Is Not Null Basic dsnnullbasic-3.1.2-neoforge-1.21.1.jar. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use dsnnullbasic-3.1.2-neoforge-1.21.1.jar. It targets 1.21.1 with NeoForge; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
The project page does not say whether this file belongs on the client, dedicated server, or both.
- 04
Pick the file you checked
Use the “Get this file” button beside dsnnullbasic-3.1.2-neoforge-1.21.1.jar. It opens that exact file at the source.
About this project
What does DamageSource Is Not Null Basic add?
DamageSource Is Not Null Basic
Project structure
The DSNNULL project is now split into two parts:
DSNNULL Basic
The core module. Provides the shared guard logic, fallback handling, and baseline vanilla-oriented protection.
DSNNULL Plus
The extended module. Builds on Basic and adds extra compatibility coverage for supported third-party mods and modded entities.
This split was made because maintaining both the core system and all modded-entity coverage inside a single package became increasingly difficult. Separating them makes the project easier to maintain, expand, and debug.
Explanation on the DamageSource Null Pointer Exception
Vanilla Minecraft and mod loaders assume that DamageSource is never null.
However, some mods still trigger damage or death logic incorrectly and pass a null DamageSource, which can cause crashes such as:
LivingDeathEvent.getSource() is null
These crashes can interrupt gameplay and create issues that are hard to debug, as the stacktrace seldom includes the actual method that pass a null into damage handling pipeline. This mod provides a defensive layer to prevent such issue from causing crash, and it also catch the point where null is passed into the pipeline, so that the actual debugging could be easier.
Environment
- Forge - 1.20.1
- NeoForge - 1.21.1
Support
If you'd like to support my modding work, including maintenance, updates, and compatibility work, Patreon is available here:
Project description from CurseForge.
Pick your setup
DamageSource Is Not Null Basic by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.20.1
1 loader buildCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
DamageSource Is Not Null Basic versions and loaders
dsnnullbasic-3.1.2-neoforge-1.21.1.jar
18 May 2026
dsnnullbasic-3.1.1-neoforge-1.21.1.jar
15 May 2026
dsnnullbasic-3.1.1-forge-1.20.1-all.jar
10 May 2026
dsnnullbasic-3.1.0-neoforge-1.21.1.jar
9 Apr 2026
dsnnullbasic-3.1.0-forge-1.20.1-all.jar
9 Apr 2026
dsnnullbasic-3.0.0-neoforge-1.21.1.jar
8 Apr 2026
dsnnullbasic-3.0.0-forge-1.20.1-all.jar
7 Apr 2026
Looking for an older file? The official CurseForge project page is in Resources.