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

advancement trigger minecraft:item_used_on_block does not check the block used_on

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.18.1
    • None
    • Java (build 1.8.0_321-b07)
    • Unconfirmed
    • (Unassigned)

      The advancement checks the resulting block, not the block the item was used on: "item_used_on".

      In vanilla this trigger is used for the jukebox, and the action does not change the block, so the fact that it fails to properly check for block on which the item was used doesn't matter.

      But it matters when the action changes the block. Then the intended check will fail since the block on which the item was used no longer exists/matches.

      Example... try to test for a player using a bucket on a minecraft:water_cauldron.
      The bucket takes the water, CHANGING the block to a minecraft:cauldron (in the past it was a minecraft:cauldron before and after with only block data changing to a level of 0). Thus the check now fails and the advancement is not properly granted.

      Example:

        "criteria": {
          "cauldronwater": {
            "trigger": "minecraft:item_used_on_block",
            "conditions": {
              "item": {
                "items": [
                  "minecraft:bucket"
                ]
              },
              "location": {
                "block": {
                  "blocks": [
                    "minecraft:water_cauldron"
                  ]
                }
              }
            }
          }
        }
      

      Thus it is not possible to detect a player picking up water from a water cauldron, or to differentiate between picking up water vs lava vs powered_snow. They all result in a minecraft:cauldron... the RESULTING block... not the block the item was used on.

            Unassigned Unassigned
            Gatinh0 Scott Miller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: