Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-232571

Advancement trigger "minecraft:consume_item" runs reward twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.17.1
    • None
    • Java
    • Unconfirmed
    • (Unassigned)

      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.

       

            Unassigned Unassigned
            Igtarr Craig Dorsey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: