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

Items with equivalent but differently ordered name objects don't stack

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Won't Fix
    • Affects Version/s: Minecraft 18w02a, Minecraft 18w11a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed

      Description

      I have item 1:

      /give @s chorus_fruit_popped{display:{Name:"{\"italic\":false,\"color\":\"dark_red\",\"text\":\"Ashen Talisman\"}"}}
      

      And item 2:

      /give @s chorus_fruit_popped{display:{Name:"{\"color\":\"dark_red\",\"text\":\"Ashen Talisman\",\"italic\":false}"}}
      

      These should be the same item, as they have all the same tags. However, since the name object is stored in a string, the equivalency between the name objects is determined to be unequal, and so these two items will not stack with each other, even though they are functionally identical.

      This is not only a problem when trying to stack items obtained from 2 different location (e.g. a function and a loot table), it is also a problem when checking the name of an item in the possession of an entity, as you now must know the entire name object (The order of which is undefined) instead of just the name, as was the case pre-1.13.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                grum [Mojang] Grum (Erik Broes)
                Reporter:
                avantir_yihn Avantir_Yihn
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: