Version Saved Data Before Changing Its Shape
@prranitarora▲ 10 net votes
A common failure is loading an older world after a mod changes a saved field or identifier, causing defaults, lost state, or a load failure. Store a data version with persisted state and migrate older versions explicitly before normal use; when debugging, inspect the saved version and migration path alongside the current schema. Exact serialization hooks and migration mechanisms depend on the Minecraft version, loader, and mappings.
1 COMMENT
Vanilla already writes a
DataVersioninto level and chunk NBT, but it does not track your mod's changes, so store your own version key in the mod's data. Other platform gotchas welcome in the comments.