mojira.dev
MC-226525

Advancement Trigger "minecraft:consume_item" Functions Incorrectly

When having multiple advancements that use the "minecraft:consume_item" trigger, all advancements with that Trigger activate simultaneously, even with different item conditions.

For example, I'm currently working on a Datapack that has items do special effects. As such, I have multiple Advancements for triggering function commands. Despite them all having differing conditions, like requiring custom food or glow berries , instead of triggering only the one just consumed, consuming either of them triggers both of the advancements. This happens even after you clear advancements from a player.

The file attached shows the commands involved in the example, and how despite not interacting, they somehow trigger both commands, plus others that I've made.

Attachments

Comments 4

You need to update these to the new format, from the changelog

CHANGED PREDICATES
ITEM PREDICATE
item field expended to items, now accepting an array of item types

Replacing the old "item" condition with "items" still produces the same issue, however.

Appears to still occur in 1.19.2. I created an advancement with the following trigger that should only unlock for apples, but it will in fact trigger for any item.

 

"eat_apple": {
      "trigger": "minecraft:consume_item",
      "item": {
        "items": [
          { "item": "minecraft:apple" }
        ]
      }
    }

It's "items": [ "minecraft:apple" ], not "items": [ { "item": "minecraft:apple" } ]

Adam

(Unassigned)

Unconfirmed

(Unassigned)

1.17 Pre-release 1

Retrieved