Skip to content

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

@runcows

Description

@runcows

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions