I was making a custom achievement, but the funtion in the reward doesn't run when the conditions are met. The advancement does grant appear in the /advancement
command and it does grant the reward when I manually grant the achievement, but it doesn't grant the reward when not doing it manually.
Advancement JSON
{
"criteria": {
"glass_breaker": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "room:glass_breaker_crafted"
}
}
},
"rewards": {
"function": "room:crafted_glass_breaker"
}
}
I have it so when the achievement is unlocked it will run a function that gives the player the custom item then revokes the advancement.