Back to mods
NullPointer Fix for Mio project artwork

Modrinth · Minecraft mod

NullPointer Fix for Mio

This mod safely fixes the null pointer issue in Minecraft network packets.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which NullPointer Fix for Mio release matches 1.20.6 Forge?

Updated 11 days ago
Best match for your filters 1.2
Game version 1.20.1, 1.20.2, 1.20.3
Loader Forge

NullPointer Fix for Mio 1.2 targets 1.20.1, 1.20.2, 1.20.3 with Forge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is NullPointer Fix for Mio required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release Forge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does NullPointer Fix for Mio 1.2 need?

1.2 on 1.20.6 Forge. Every mod below is checked against that same setup.

No extra mods listed for this file

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 NullPointer Fix for Mio without breaking your instance.

Built for NullPointer Fix for Mio 1.2 on 1.20.6 Forge. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.2. It targets 1.20.1, 1.20.2, 1.20.3 with Forge; another release may have different loader, side or dependency requirements.

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

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.2. It opens that exact file at the source.

About this project

What does NullPointer Fix for Mio add?

This mod safely modifies the core read method of Minecraft network packets.
Whenever any mod attempts to write null into a packet, the method automatically replaces null with an empty CompoundTag at the return stage, ensuring that any subsequent NBT operations (such as getString, getInt, etc.) will not throw a null pointer exception.

Notes • This is a crash guard, not a data fix: a skipped feature may stop working temporarily (for example, one dropped item is discarded or one block entity stops ticking), but the server/client stays alive. • Only null-pointer exceptions are suppressed; other errors still produce a normal crash report.

[NullPointer Fix for Mio — How to enable the extra protections]

Both options are OFF by default. Only enable them if your crash log contains:
Slot.getItem / Inventory.setItem / Inventory.add / NonNullList

Add these JVM arguments:
-Dnullpointerfix.sanitizeSlots=true
-Dnullpointerfix.sanitizeInventory=true

Client (close the game first):
• CurseForge: Settings → Game Specific → Minecraft → Java Arguments, append at the end
• Prism: right-click instance → Edit → Settings → Java → JVM arguments, append at the end
• HMCL: Version Settings → Advanced Settings → JVM Arguments, append at the end
• PCL2: Settings → Launch Settings → Advanced → JVM Arguments, append at the end
• Official Launcher: Installations → Edit → More Options → JVM arguments, append at the end

Note: put them in the "JVM / Java arguments" field, NOT in "Game arguments".

Server (Forge 1.19/1.20, NeoForge 1.21):
Open user_jvm_args.txt in the server folder and add one per line:
-Dnullpointerfix.sanitizeSlots=true
-Dnullpointerfix.sanitizeInventory=true
Save and restart.
If your start script does not read that file, put the arguments between java and -jar.

How to verify:
After launch, logs/latest.log should contain:
[NPE-Fix] NullPointerFixForMio active (... slots=true, inventory=true ...)

How to disable:
Remove the arguments and restart the game/server.

Notes:
• Client crash → add on the client. Server crash → add on the server. One side does not affect the other.
• If items disappear, storage terminals misbehave, or inventories get out of sync, remove the arguments first.
• All other protections are enabled by default. These two are optional.

Project description from Modrinth.

Pick your setup

NullPointer Fix for Mio by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

21 available setups

Showing the newest 12 of 21 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

NullPointer Fix for Mio versions and loaders

3 of 9 releases match
Clear filters

Looking for an older file? The official Modrinth project page is in Resources.