Function rewards in advancements triggers that have a location associated with them (for example, minecraft:placed_block) should be executed in the position of the trigger. Should have a behaviour similar to running /execute as @s positioned <xyz> run function <reward function>
This would make custom behaviour in datapacks for placing blocks much easier, and wouldn't require raycasting the player's look. Raycasting the position of a placed block is very complicated, because the player can place a block against a ladder, through redstone dust, etc.
When an advancement has multiple required triggers with different target blocks, the execute position should be at the most recently completed trigger.
Triggers that should be executed at the context position:
minecraft:bee_nest_destroyed (the bee nest position)
minecraft:enchanted_item (the position of the enchanting table)
minecraft:safely_harvest_honey (the bee nest position)
minecraft:target_hit (the target block position)
Please sign in to leave a comment.