mojira.dev
MC-226488

Custom advancements for data packs don't work in 1.17 pre 1

I am working on a data pack and I am using a lot of custom advancements to run functions and it was working on 21w20a but they are not working on 1.17 pre 1. Like "Consume item" and "Inventory changed" criterias don't work in this version.

Comments 2

item and block fields have been changed to arrays in the pre release, so criteria like consumed_item and inventory_changed need to be updated, for example:

{
  "criteria": {
    "example": {
      "trigger": "minecraft:inventory_changed",
      "conditions": {
        "items": [{
          "items": [
            "minecraft:stone_sword",
            "minecraft:iron_sword"
          ],
          "nbt": "{Enchantments: [{id: 'minecraft:sharpness'}]}"
        }]
      }
    }
  }
}

I understand that they added the `items` tag for matching multiple item ID's, but why did they remove the `item` one for matching a single item ID? I don't see the reason for changing that, it only seems to make things less backwards compatible

Yiğit

(Unassigned)

Unconfirmed

(Unassigned)

command

1.17 Pre-release 1

Retrieved