{
  "parent": "minecraft:recipes/root",
  "rewards": {
    "recipes": [
      "minecraft:spruce_fence"
    ]
  },
  "criteria": {
    "has_the_recipe": {
      "trigger": "minecraft:recipe_unlocked",
      "conditions": {
        "recipe": "spruce_fence"
      }
    },
    "has_planks": {
      "trigger": "minecraft:inventory_changed",
      "conditions": {
        "items": [
          {
            "item": "minecraft:planks",
            "data": 1
          }
        ]
      }
    }
  },
  "requirements": [
    [
      "has_the_recipe",
      "has_planks"
    ]
  ]
}