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

Advancement trigger "minecraft:consume_item" runs reward twice

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 1.17.1
    • None
    • None
    • Java
    • Unconfirmed
    • (Unassigned)

    Description

      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.

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: