mojira.dev
MC-270940

some components don't work in an advancement's icon id

This is not a big deal, but when attempting to update a datapack I noticed that one advancement didn't seem to work. Upon inspection, I believe it is because of the new components, specifically "minecraft:item_name". Upon removing that one line from the below section of the JSON file, it worked just fine. I do not know if other components cause issues at the moment. This isn't a big deal as the item name isn't seen in an advancement, but I do not feel as though it should cause the advancement to not work.

"icon": {
      "id": "minecraft:potion",
      "count": 1,
      "components": {
        "minecraft:potion_contents": {
          "custom_color": 0,
          "custom_effects": [
            {
              "id": "minecraft:blindness",
              "amplifier": 0,
              "duration": 600
            }
          ]
        },
        "minecraft:item_name": "Potion of Blindness"
      }
    },

Comments 1

The minecraft:item_name component requires (stringified) JSON text, so

"minecraft:item_name": "\"Potion of Blindness\""

makes it work!

Sniper1.1

(Unassigned)

Unconfirmed

(Unassigned)

1.20.5 Release Candidate 2

Retrieved