{
  "format_version": "1.16.100",
  "minecraft:entity": {
    "description": {
      "identifier": "pixel:iaido",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "runtime_identifier": "minecraft:arrow",
	  "scripts": {
		"animate": [
	      "long"
		]
      },
	  "animations": {
		"run": "controller.animation.scharge",
		"long":"animation.attack.bleeder"
	  }
    },
    "component_groups": {
      "despawn":{
	    "minecraft:instant_despawn":{}
      },
      "damage": {
        "minecraft:area_attack" : {
          "damage_range": 1,
          "damage_per_tick": 20,
          "cause": "contact",
          "entity_filter": {
            "all_of": [
              { "test": "has_tag", "subject": "other", "operator": "!=" ,"value": "iai" }
            ]
          }
        }
      }
    },

    "components": {
      "minecraft:collision_box": {
        "width": 0.0,
        "height": 0.0
      },
	  "minecraft:rideable": {
		"seat_count": 1,
		"family_types": [
		  "player",
		  "mob",
		  "villager",
		  "human",
		  "monster"
		],
	    "pull_in_entities": true,
		"seats": [
		  {
			"position": [0,0.1,0],
			"min_rider_count": 1,
			"max_rider_count": 1,
			"lock_rider_rotation": 0
		  }
		]
	  },
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "any",
          "deals_damage": false
        }
      }
    },

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




