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.
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:issueAdvancement:
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