Snapshot 23w51 (or any version after 1.20.2) has changed the text component order that are inserted via item modifiers.
Steps to reproduce:
1) Launch the game in version 1.20.2 and use the attached example item modifier to insert lore to an item:
2) Use /data get command and see the component order is; italic, color, text.
3) Launch the game in snapshot 23w51b and use the same item modifier on another item.
4) Use /data get command again on the new item and see the component order is; text, italic, color.
• This change of order in text components breaks data packs that edit existing lore. Since the NBT is the same but the order is different, execute if data comparison between the existing lore and the expected lore fails.
Possible Solutions:
1) Revert to the previous order of text components.
2) Make item modifiers respect the order of components so the lore added to the item is the same with the item modifier.
Attachments
Comments 4
Testing based on json strings was never the suggested/best solution; using custom NBT is what most creators do, as those don't change between versions. The ordering in JSON text components was always arbitrary and prone to change between versions. The "tag" NBT doesn't correct formatting/types of fields per MC-124186.
The pack format number has changed, already "invalidating" old packs. The only things that break from this change are packs which are improperly updated. Changing the order (which, again, is arbitrary and not clearly defined) just to fix packs with bad practices that use an outdated format is much more trouble than it's worth.
I do not use strings to check for things. This is used for implementing semi-updated item lore that are dynamic thanks to function macros. One is able to find the matching line of lore and replace it with something else, without changing other existing lines. I use this to update the item lore depending on its custom NBT.
This sounds more like a feature request or feedback to me. Can you explain what the "bug" is here? It's expected that certain things in older data packs will break in newer versions; that's why pack versions exist.