No Null Processors

Quick rating

Community listing page, reviews here may not be monitored by the author.

No Null Processors

No reviews yet

Fixes structure crash in 1.17+ due to null processor lists coming from nowhere

No Theme
No Genre
Development: Abandoned
Mod Loaders
Forge
Fabric
Minecraft

Community voices

Reviews

List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Show per page
10
25
50
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
No Null Processors Fabric v2.0.2 (1.18.1 MC)

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Files

Forge download: Click here

Fabric download: Click here

--------------------------------------------------------------------------------------------------------------


 NOTE: 1.18.2 FIXED NULL PROCESSORS SO THIS MOD IS NO LONGER NEEDED FOR THAT MC VERSION AND NEWER


INFO

Have you been trying to pre-generate large areas of your world with pregenerator mods and keep randomly crashing with this error? 


Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.structure.processor.StructureProcessorList.getList()" because the return value of "java.util.function.Supplier.get()" is null

  at net.minecraft.structure.pool.SinglePoolElement.createPlacementData(SinglePoolElement:148) ~[?:?]

  at net.minecraft.structure.pool.SinglePoolElement.generate(SinglePoolElement:124) ~[?:?]

 

Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_5497.method_31027()" because the return value of "java.util.function.Supplier.get()" is null

  at net.minecraft.structure.pool.SinglePoolElement.createPlacementData(SinglePoolElement:148) ~[?:?]  

  at net.minecraft.structure.pool.SinglePoolElement.generate(SinglePoolElement:124) ~[?:?]


If so, congrats! You found a really wacky bug in 1.17.1 Minecraft! This mod aims to fix that.


The bug is tricky to explain but basically to trigger it, you need a mod or datapack that has processor lists created by worldgen json files, use a chunk pregenerator mod or something to load a massive amount of chunks, and then load all those chunks that contains structures that uses json processor lists. Randomly, that may crash due to a null processor list.
So what's going on? Well, Minecraft has a registry of processor lists inside that should be created at world startup. Then when the game needs it, it grabs it from the registry but it shouldn't be rewriting that registry at runtime. Cause that would be bad right? Well...


When a structure layout is created during worldgen, the game saves that layout and what pieces were picked into the chunk itself. Then later, as the chunk is being made, it loads that piece from the chunk to spawn in the world. Except, upon reading that structure piece from the chunk, it also needs to read the processor list attached to the piece to know what processors should run for that piece. And it's here that the bug is done. The code to read the processor list is incorrect and will take the processor it reads and register it again to the registry, replacing itself with itself, and then use it.


And this registry replacing with itself is not threadsafe. And since minecraft creates chunks in a multithreaded way... there exists a point where two structure pieces using the same processor could try reading/writing to that same exact entry in the registry. And when this rare collision occurs, one of the structure pieces may end up with a null processor which then crashes the game because the game cannot handle spawning a null processor because it doesn't exist! 


Wacky right? Super weird and painful to debug but thanks to another modder, we were able to figure this out and create this fix. As far as we know, 1.16.5 does not have this issue. The problem started in 1.17.0 and continues to persist to 1.18.1. However, 1.18.2 fixed this bug. The fix this mod does is it caches the RegistryOps used for each individual processor list so it only writes itself to the registry once and reuses that forever. Thus avoiding the whole issue with multiple read/writes to that same specific registry entry. (In theory lol)

Hope this helps!

Discord Link to #telepathicgrunt-mods channel for my mods! : 

https://discord.gg/K8qRev3yKZ

discord-logo-png-free-transparent-png-logos-discord-png-logo-300_300 (PNG)  | BeeIMG

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

3.7m
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works