HomeJavaModsDamageSource Is Not Null Basic
DamageSource Is Not Null Basic
ModsJava

DamageSource Is Not Null Basic

by vomiter · on CurseForge

⬇ Download on CurseForge

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


Support

If you'd like to support my modding work, including maintenance, updates, and compatibility work, Patreon is available here:

https://patreon.com/vomiter_scp

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

DamageSource Is Not Null Basic is a free Minecraft Java mod. Compatible with Minecraft 1.21.1, 1.20.1. Downloaded 63,545 times (via CurseForge). Download it and open it directly in the game.

Explore more