{
  "criteria": {
    "requirement": {
      "trigger": "minecraft:player_hurt_entity",
      "conditions": {
        "player": {
          "equipment": {
            "mainhand": {
              "items": [
                "minecraft:wooden_sword"
              ],
              "components": {
                "minecraft:custom_data": {
                  "thorny": "tag"
                }
              }
            }
          }
        }
      }
    }
  },
  "rewards": {
    "function": "survivalplus:tools/dealdmg/thorny"
  }
}