Minecraft Datapack advancements not working



  • 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"
        }
    }
    


  • This advancement seems like it is supposed to trigger when the recipe is unlocked, but is there another advancement that allows it to be unlocked? That was an issue I ran into early on. There needs to be another advancement that triggers when a condition is met (say, collecting stone) that grants the recipe. You can test this with /recipe give @a *

    Also it needs to be in your own room namespace. Assuming the formatting is correct, it does seem that it should trigger when the recipe is unlocked.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2