Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-267490

The text component order breaks existing data packs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 23w51b
    • None
    • Windows 10 Pro
      Java Edition, Snapshot 23w51b
    • Unconfirmed
    • (Unassigned)

      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.

            Unassigned Unassigned
            Wyvernity Wyvernity
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: