{
  "format_version": "1.16.100",
  "minecraft:item": {
    "description": {
      "category": "equipment",
      "identifier": "legacy:villager_gold_horn"
    },
    "components": {
      "minecraft:icon": {
        "texture": "legacy_villager_gold_horn"
      },
      "minecraft:max_stack_size": 1,
      "minecraft:stacked_by_data": true,
      "minecraft:foil": false,
      "minecraft:hand_equipped": true,
      "minecraft:enchantable": {
        "value": 10,
        "slot": "goat horn"
      },
      "minecraft:durability": {
        "max_durability": 450
      },
      "minecraft:mining_speed": 1,
      "minecraft:weapon": {
        "on_hurt_entity": {
          "event": "hurt"
        },
        "on_not_hurt_entity": {
          "event": "hurt"
        },
        "on_hit_block": {
          "event": "hurt"
        }
      },
      "minecraft:on_use":{
        "on_use":{
          "event":"horn",
          "target":"self"
        }
      },
      "minecraft:render_offsets": {
        "main_hand": {
          "third_person": {
            "scale": [
              0.1,
              0.1,
              0.1
            ]
          },
          "first_person": {
            "scale": [
              0.037999999999977205,
              0.037999999999977205,
              0.037999999999977205
            ]
          }
        },
        "off_hand": {
          "third_person": {
            "scale": [
              0.1,
              0.1,
              0.1
            ]
          },
          "first_person": {
            "scale": [
              0.037999999999977205,
              0.037999999999977205,
              0.037999999999977205
            ]
          }
        }
      },
      "minecraft:creative_category": {
        "parent": "itemGroup.name.goatHorn"
      },
      "minecraft:repairable": {
        "repair_items": [
          {
            "items": [
              "minecraft:iron_ingot"
            ],
            "repair_amount": 50
          },
          {
            "items": [
              "legacy:villager_gold_horn"
            ],
            "repair_amount": "context.other->query.remaining_durability + 0.2 * context.other->query.max_durability"
          }
        ]
      },
      "minecraft:damage": 1,
      "minecraft:can_destroy_in_creative": false,
      "minecraft:display_name": {
        "value": "Golden Villager Horn"
      },
      "minecraft:cooldown": {
        "category": "horn",
        "duration": 25
      },
      "tag:minecraft:is_tool": {},
      "minecraft:allow_off_hand": true
    },
    "events": {
      "on_use_event": {
        "sequence": [
          {
            "damage": {
              "type": "magic",
              "amount": 1,
              "target": "self"
            }
          }
        ]
      },
      "hurt": {
        "damage": {
          "type": "magic",
          "amount": 1,
          "target": "self"
        }
      },
      "horn":{
        "damage": {
          "type": "magic",
          "amount": 30,
          "target": "self"
        },
        "run_command":{
          "command":[
            "summon legacy:gold_villager_backup",
            "playsound illager.sound.horn"
          ],
          "target":"holder"
        }
      }
    }
  }
}