fix block state mappings being replaced with random blocks - #691
Closed
derekcmoore wants to merge 1 commit into
Closed
derekcmoore wants to merge 1 commit into
derekcmoore wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Block states stored by earlier versions all fail to decode on 26.3: the NBT keys got renamed from
Name/Propertiestoid/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.loadFromStoragethen 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:
After:
That's a mapping store I wrote in the old format rather than a real world, so
somemod:unobtainium_oreis a stand-in.Also in there: the data version gets stored so the fixer isn't starting from 0, and serialize goes via
FULL_CODECsinceCODECcollapses default states to a bare string now.Might be part of what
CORRUPTS OLD WORLDSwas about, though I don't know if it covers everything you hit.