Skip to content

Conversation

@ethanicusss
Copy link
Collaborator

Description from curseforge:

Chunk Corruption Preventor is a bugfix mod that detects when a chunk corruption is about to happen, and code-injects with a "Safe Serialize" method, so that only the failing element of the chunk will be wiped rather than the entire chunk.

The logic goes like this:

If a chunk's nbt is messed up after Mojang's code has serialized it,
Then serialize it again
If serialization fails again during the blockEntity section (for example)
Then do not save the specific blockEntity that caused the fail
And output loads of logging data to the console and chat

The intention is to help server admins and reduce the annoyance of chunk corruptions for players.

The player will receive chat output so they know what happened, they can ping an admin with the details, and they still have the rest of their chunk to play with while they wait for the admin to get online

If only one block is causing the issue, then there is no need to wipe the whole chunk!

This mod does not cause additional issues, but of course it may not work every time. If the chunk is already going to be wiped, then the game may as well try again. The whole "Safe Serialize" code is wrapped in a bunch of try/catch statements, which is ok because it doesn't run very often, and it also means there is good logging and it won't effect the map thread.

There is also no chance of an infinite loop here. Once "Safe Serialize" has run once for a saving chunk, it will not run again during the same cycle.

@ethanicusss
Copy link
Collaborator Author

@The-Shortman The-Shortman added the type: bugfix This pull request closes a bug report issue or a collection of bug report issues. label Dec 17, 2025
@The-Shortman The-Shortman moved this from Unaddressed to In review in Create: Astral Bug Tracker Dec 17, 2025
@The-Shortman The-Shortman added this to the Patch 2.1.5 milestone Dec 17, 2025
@The-Shortman The-Shortman added the type: enhancement This pull request adds/this issue requests a new feature. label Dec 17, 2025
@ethanicusss ethanicusss merged commit 7560454 into Astral-Experimental Dec 17, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from In review to Merged in Create: Astral Bug Tracker Dec 17, 2025
@ethanicusss ethanicusss deleted the feature/chunk-corruption-preventor branch December 17, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bugfix This pull request closes a bug report issue or a collection of bug report issues. type: enhancement This pull request adds/this issue requests a new feature.

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants