{
  "parent": "manic:technical/root",
  "criteria": {
    "requirement": {
      "trigger": "minecraft:inventory_changed",
      "conditions": {
        "player": [
          {
            "condition": "minecraft:inverted",
            "term": {
              "condition": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "nbt": "{Tags:[\"manic.grimoire.open\"]}"
              }
            }
          }
        ],
        "items": [
          {
            "items": [
              "minecraft:warped_fungus_on_a_stick"
            ],
            "nbt": "{manic:{grimoire_state:1}}"
          }
        ]
      }
    }
  },
  "rewards": {
    "function": "manic:item/grimoire/close"
  },
  "requirements": [
    [
      "requirement"
    ]
  ]
}
