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

Advancement trigger item_used_on_block no longer triggers when using the right click action of a block without an item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 24w13a
    • None
    • Confirmed
    • Advancements

      In 1.20.4 (and earlier), it was possible, to do right click detection of any block that has a right click action like so:

      {
          "criteria": {
              "click_button": {
                  "trigger": "minecraft:item_used_on_block",
                  "conditions": {
                      "location": [
                          {
                              "condition": "minecraft:location_check",
                              "predicate": {
                                  "block": {
                                      "tag": "minecraft:buttons"
                                  }
                              }
                          }
                      ]
                  }
              }    
          },
          "rewards": {
              "function": "test"
          }
      }
      

      However, this no longer works in the current snapshot (note that you have to replace tag with blocks and prefix the block tag with a #)

      It looks like, the advancement now requires an item to be used.

      Steps to reproduce:

      1. Download the 1.20.5 datapack from the attachment
      2. Use a dye or glow ink on a sign
        -> You will see a chat message "Do not temper with the signs on my yard!"
      3. Right click any button
        -> The advancement `buttons` does not trigger
      4. Download the 1.20.4 version of the datapack (the only difference is the blocks field being changed to tag and the # being removed, because of format changes)
      5. Repeat the steps above in 1.20.4
        -> Pressing a button now prints "WHY ARE YOU PLAYING WITH MY BUTTONS?!"

      Expected Behavior

      minecraft:item_used_on_block should work for any right click action on any block that has a right click action.

      Observed Behavior

      minecraft:item_used_on_block only triggers when using an item on a block.

            Unassigned Unassigned
            Schortan [Mod] NeunEinser
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: