{
  "model": {
    "type": "minecraft:condition",
    "model": "minecraft:item/netherite_sword",
    "property": "minecraft:has_component",
    "component": "minecraft:custom_name",
    "on_true": {
      "type": "minecraft:select",
      "property": "minecraft:component",
      "component": "minecraft:custom_name",
      "cases": [
        {
          "when": "Hero Sword",
          "model": {
            "type": "minecraft:model",
            "model": "minecraft:item/hero_sword"
          }
        }
      ],
      "fallback": {
        "type": "minecraft:model",
        "model": "minecraft:item/netherite_sword"
      }
    },
    "on_false": {
      "type": "minecraft:model",
      "model": "minecraft:item/netherite_sword"
    }
  }
}