Skip to content

fix block state mappings being replaced with random blocks - #691

Closed
derekcmoore wants to merge 1 commit into
MCRcortex:263from
derekcmoore:263-fix
Closed

derekcmoore wants to merge 1 commit into
MCRcortex:263from
derekcmoore:263-fix

Conversation

@derekcmoore

@derekcmoore derekcmoore commented Sep 22, 2026 •

Copy link
Copy Markdown

Block states stored by earlier versions all fail to decode on 26.3: the NBT keys got renamed from Name/Properties to id/properties. Vanilla blocks are fine since the datafixer handles the rename, but anything it can't resolve comes out as air, typically a block from a mod that's since been removed. loadFromStorage then hands that id a random block state and force-resaves it, so the original is gone.

Those entries now keep their id but stay unmapped and don't get written back, so they come back on their own if the block ever resolves again.

Before:

id 6  got minecraft:deepslate_tile_stairs[facing=east,half=bottom,shape=outer_right,waterlogged=false]   (rewritten to disk)

After:

id 6  got minecraft:air   (bytes untouched, still reads {Name:"somemod:unobtainium_ore"})

That's a mapping store I wrote in the old format rather than a real world, so somemod:unobtainium_ore is a stand-in.

Also in there: the data version gets stored so the fixer isn't starting from 0, and serialize goes via FULL_CODEC since CODEC collapses default states to a bare string now.

Might be part of what CORRUPTS OLD WORLDS was about, though I don't know if it covers everything you hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant