packtest icon indicating copy to clipboard operation
packtest copied to clipboard

`dummy @s use block` doesn't trigger the `any_block_use` advancement trigger

Open runcows opened this issue 3 months ago • 0 comments

Sample code for reproducibility. The dummy player will never run the say command as part of the reward function and the test will fail

Test: test:issue

# @template gm4:test_platform
# @dummy ~ ~1 ~
# @timeout 400

setblock ~ ~1 ~2 decorated_pot
give @s oak_leaves
rotate @s facing ~.5 ~ ~2
execute at @s run dummy @s use block ~ ~ ~2
assert entity @s[advancements={test:interact_with_decorated_pot=true}]

Advancement: test:interact_with_decorated_pot

{
  "criteria": {
    "use_pot": {
      "conditions": {
        "location": [
          {
            "condition": "minecraft:location_check",
            "predicate": {
              "block": {
                "blocks": [
                  "minecraft:decorated_pot"
                ]
              }
            }
          }
        ]
      },
      "trigger": "minecraft:any_block_use"
    }
  },
  "rewards": {
    "function": "test:say"
  }
}

Reward Function: test:say

say Advancement Triggered.

runcows avatar Sep 11 '25 22:09 runcows