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

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • Minecraft 18w02a, Minecraft 18w11a, 1.15.2
    • Confirmed

      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.

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

              Created:
              Updated:
              Resolved:
              CHK: