-
Bug
-
Resolution: Unresolved
-
None
-
1.20.4
-
None
-
Confirmed
-
Datafixer, Items
-
Important
-
Platform
When updating a world from 1.20.2 or below which contains items with fields containing boolean JSON components (e.g. bolded name...) to any version above 1.20.2, said fields are completely cleared instead of updating to the new format. Entities will update, but items will not.
What I expected to happen was...:
The item containing the old JSON format is updated to the new JSON format, such that the name, lore, etc. remain intact upon world update.
What actually happened was...:
The item containing the old JSON format has all subsequent fields that contain the old JSON format completely wiped. (resets to default name/and or deletes all lore)
Steps to Reproduce:
1. Give yourself an item using old JSON formatting in version 1.20.2 or below.
Example:
/give @p gold_block{display:{Name:'{"text":"Text","color":"yellow","bold":"true"}',Lore:['{"text":"Text","color":"gold","bold":"true"}']}} 1
2. Store the item in the player inventory or in a container
3. Update to 1.20.3, 1.20.4 or future versions.
Notice that upon reloading the world, the item will reset to its default name and its lore will clear upon the item being loaded into the world.
Fixing this bug may be important for those with custom items who wish to update to a newer version, but do not want said items to return to normal.
This can be fixed by updating the old JSON format to the new format upon loading (similar to entities), or adding compatibility such that both old and new JSON boolean format will work (as it may be noted that all maps and datapacks that contain these components, including essentially all realm maps, will become non-functional when updating between versions in the current state).