Mojang / DataFixerUpper

A set of utilities designed for incremental building, merging and optimization of data transformations.
MIT License
1.2k stars 138 forks source link

Make map codecs more resistant to erroring entries. Fixes MC-197860 #55

Closed alcatrazEscapee closed 8 months ago

alcatrazEscapee commented 4 years ago

This is a really simple change that I believe fixes MC-197860. More details are in the issue there, but the root of the problem is the UnboundedMapCodec's behavior in the case of erroring entries. Previously, this (along with any other BaseMapCodec implementor) would discard all valid entries after an error, while only actually reporting actual erroring entries.

This PR moves the collection of read results outside the check for the data result in the accumulator, such that all valid entries will get added to the immutable map builder, while keeping intact the behavior of the apply2stable on the actual success or failure of the result in question.

peterix commented 2 years ago

Closing and reopening to rerun checks.

FoggierTiger535 commented 1 year ago

I have this issue on my singleplayer world, would love to get my nether and end dimensions avaliable again, how do I use this fix? I'm not good with code so this is probably really simple and im just dumb :D

Gegy commented 8 months ago

Thank you for this PR! I believe the issue addressed here is now resolved by this commit. 😊

alcatrazEscapee commented 8 months ago

Thank you!