{
  "condition": "minecraft:any_of",
  "terms": [
    {
      "condition": "minecraft:entity_properties",
      "entity": "this",
      "predicate": {
        "equipment": {
          "mainhand": {
            "predicates": {
              "minecraft:custom_data": "{glowtome:tag}"
            }
          }
        }
      }
    },
    {
      "condition": "minecraft:all_of",
      "terms": [
        {
          "condition": "minecraft:entity_properties",
          "entity": "this",
          "predicate": {
            "equipment": {
              "offhand": {
                "predicates": {
                  "minecraft:custom_data": "{glowtome:tag}"
                }
              }
            }
          }
        },
        {
          "condition": "minecraft:inverted",
          "term": {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "equipment": {
                "mainhand": {
                  "items": [
                    "minecraft:knowledge_book"
                  ]
                }
              }
            }
          }
        }
      ]
    }
  ]
}
