mojira.dev
MC-232571

Advancement trigger "minecraft:consume_item" runs reward twice

When making a custom advancement, I noticed that the "consume_item" trigger pulses twice when it is revoked in the reward function, which I had not noticed before for other triggers. To reproduce do the following steps:

1. Create a custom advancement which has a reward function. For mine I have it set to activate when any item with the "item:1b" custom tag is consumed.

{
  "criteria": {
    "requirement": {
      "trigger": "minecraft:consume_item",
      "conditions": {
        "item": {
          "nbt": "{item:1b}"
        }
      }
    }
  },
  "rewards": {
    "function": "test:debug"
  }
}

2. In the reward function, revoke the advancement and place a command in it which will obvious if it is run twice.

advancement revoke @s only test:test
say hello

In my example the namespace is "test," so apologies is the naming is confusing. However, when I used this advancement it says "hello" twice. The custom item I am using for this advancement trigger is a Honey Bottle, if that is relevant.

 

Comments 1

The custom item I am using for this advancement trigger is a Honey Bottle, if that is relevant.

Hi there; thanks for the report. Funnily enough, this issue is exclusive to honey bottles and we're currently tracking this at MC-182814 so we'll be resolving this ticket as a duplicate.

[media]

Craig Dorsey

(Unassigned)

Unconfirmed

(Unassigned)

1.17.1

Retrieved