{
  "format_version": "1.16.100",
  "minecraft:entity": {
    "description": {
      "identifier": "pixel:spear_damage",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "runtime_identifier": "minecraft:arrow",
	  "scripts": {
		"animate": [
	      "run",
	      "long"
		]
      },
	  "animations": {
		"run": "controller.animation.scharge",
		"long":"animation.attack.remover_3s"
	  }
    },
    "component_groups": {
      "despawn":{
	    "minecraft:instant_despawn":{}
      },
      "shoot":{
	    "minecraft:variant":{
	      "value": 2
	    }
      },
      "lance_horse":{
        "minecraft:area_attack" : {
          "damage_range": 2,
          "damage_per_tick": 10,
          "cause": "contact",
          "entity_filter": {
            "all_of": [
              { "test": "has_tag", "subject": "other", "operator": "!=" ,"value": "scharge" }
            ]
          }
        }
      },
      "nonshoot":{
	    "minecraft:variant":{
	      "value": 1
	    }
      }
    },

    "components": {
      "minecraft:collision_box": {
        "width": 0.0,
        "height": 0.0
      },
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "any",
          "deals_damage": false
        }
      },
      "minecraft:type_family": {
        "family": [ "attack" ]
      }
    },

    "events": {
      "minecraft:entity_spawned": {
        "add":{
          "component_groups":[
            "lance_horse"
          ]
        }
      },
      "non_shoot": {
        "add":{
          "component_groups":[
            "nonshoot"
          ]
        }
      },
      "lance_horse": {
        "add":{
          "component_groups":[
            "lance_horse"
          ]
        }
      },
      "remove_damage":{
        "remove":{
          "component_groups":[
            "lance_horse"
          ]
        }
      },
      "remove_tag":{
        "run_command": {
          "command": [
            "execute as @a[tag=scharge] run tag @s remove scharge"
          ]
        }
      },
      "remove_katana":{
        "add":{
          "component_groups":[
               "despawn"
          ]
        }
      }
    }
  }
}




