{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "add:projectile_mainhand",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "scripts": {
        "animate": [
          "despawn"
        ]
      },
      "animations": {
        "despawn": "controller.animation.despawn",
        "life_time": "animation.life_time"
      }
    },
    "components": {
      "minecraft:type_family": {
        "family": [
          "inanimate"
        ]
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "deals_damage": true,
            "on_damage_sound_event": "item.shield.block",
            "on_damage": {
              "event": "minecraft:send_damage"
            }
          }
        ]
      },
      "minecraft:fire_immune": {
      },
      "minecraft:collision_box": {
        "height": 2.5,
        "width": 0.8
      },
      "minecraft:physics": {
        "has_gravity": false
      },
      "minecraft:health": {
        "value": 9999
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:pushable": {
        "is_pushable": false,
        "is_pushable_by_piston": false
      }
    },
    "component_groups": {
      "minecraft:despawn": {
        "minecraft:instant_despawn": {
        }
      }
    },
    "events": {
      "minecraft:send_damage": {
        "run_command": {
          "command": [ "event entity @e[r=3] minecraft:delay_mainhand_animation" ]
        }
      },
      "minecraft:despawn": {
        "add": {
          "component_groups": [
            "minecraft:despawn"
          ]
        }
      }
    }
  }
}