Repository navigation
Change Safety
Design stage. Nothing here is implemented.
The single most dangerous assumption a mod manager can make is that all changes are alike. They are not, and the asymmetry is severe enough to shape the whole design.
Adding a mod to a server with an existing world is reversible: stop, remove it, start again, and the world is as it was.
Removing one is not. Once a mod's blocks, items or entities exist in a world, taking the mod away means NeoForge loads a world referencing registry entries that no longer exist. The outcomes range from a refusal to start, to silently replacing every one of that mod's blocks with air and deleting the items from every inventory and chest in the world. Players lose builds and possessions, and no amount of restarting brings them back.
Updating sits in between: usually safe, occasionally destructive when a mod renames or removes its own registry entries between versions.
A system that treats "remove mod X" as the mirror image of "add mod X" will eventually destroy a world. This one classifies every change:
| Change | Risk | Gate |
|---|---|---|
add |
Safe | Normal validation |
update |
Usually safe | Validation, plus a check for dropped registry entries between versions |
remove |
Potentially destructive | Validation, world-content check, explicit operator acknowledgement, verified world backup |
The check does not require scanning terabytes of region files. Minecraft writes the set of registered identifiers into level.dat when a world is saved, so the world itself records which namespaces it knows about.
Reading that gives a cheap, conservative answer:
-
Namespace absent from
level.dat— the mod was never loaded into this world, or contributed nothing. Removal is safe. - Namespace present — the world may contain its content. Treat removal as destructive.
Conservative in the right direction: it can say "unsafe" for a mod whose blocks were never actually placed, which costs an unnecessary confirmation. It will not say "safe" about a mod whose blocks are in the ground.
A deeper scan of region files could distinguish the two, but it is expensive and only converts some confirmations into silence. Not worth it until someone is annoyed by the prompts.
Every change goes through a plan first — the model package managers and infrastructure tools converged on for the same reason.
engine plan --version 26.2
+ add sodium-extra 0.6.0
~ update create 6.0.4 -> 6.0.5
- remove tinkers-construct 3.9.1 DESTRUCTIVE
world level.dat references namespace "tconstruct"
requires --acknowledge-destructive and a verified backup
26.2@a4f19c -> 26.2@b7e223 (297 mods, 3 changes)
Then engine apply --plan <id>, which refuses if anything has moved underneath it since the plan was computed.
This is not ceremony. It buys several things at once:
- Dry run is free — the plan is the dry run, not a separate code path that can drift from the real one.
- The live gate becomes natural. Approving a deployment is approving a specific plan, not a vague intent.
- The audit trail writes itself. What was proposed, what was approved, by whom, and what actually ran.
- It is testable. Plan generation is a pure function of desired state and current state, so it can be unit-tested exhaustively without a Minecraft server anywhere near it.
A world backup taken on a schedule is worth much less than one taken immediately before the change that might ruin the world.
Every deployment that carries a destructive change takes a world snapshot first, records it against the modset digest, and verifies it is readable before the server is stopped. An unverified backup is not a backup — the moment you discover it is corrupt is the moment you need it.
Retention follows the same rule as modsets: keep the snapshots for the last few deployments, plus any snapshot taken before a destructive change, for longer.
Deleting a row from the sheet must never remove a mod from a server.
A deleted row means "I do not know what happened to this row" — a paste error, a sorted range, a fat finger. It cannot be allowed to mean "delete this mod's content from a live world".
Removal requires setting Want to no or ban explicitly. A row that vanishes is reported as an anomaly and the mod stays exactly where it is until someone says otherwise.
Design stage — not implemented
Design
Validation
Trust
Interfaces
Operations
Project
Reference