{
	"format_version": "1.16.100",
	"minecraft:entity": {
		"description": {
			"identifier": "pixel:lance_charge",
			"is_spawnable": false,
			"is_summonable": true,
			"is_experimental": false,
			"runtime_identifier": "minecraft:arrow",
			"scripts": {
				"animate": [
					"run",
					"long"
				]
			},
			"animations": {
				"run": "controller.animation.pcharge",
				"long": "animation.attack.remover_lance"
			}
		},
		"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": "pcharge"
							}
						]
					}
				},
				"minecraft:timer": {
					"time": 10,
					"looping": true,
					"time_down_event": {
						"event": "remove_damage",
						"target": "self"
					}
				}
			},
			"lance_null": {
				"minecraft:timer": {
					"time": 0.05,
					"looping": true,
					"time_down_event": {
						"event": "remove_tag",
						"target": "self"
					}
				}
			},
			"nonshoot": {
				"minecraft:variant": {
					"value": 1
				}
			}
		},
		"components": {
			"minecraft:collision_box": {
				"width": 0,
				"height": 0
			},
			"minecraft:damage_sensor": {
				"triggers": {
					"cause": "any",
					"deals_damage": false
				}
			},
			"minecraft:type_family": {
				"family": [
					"attack",
					"lancer"
				]
			}
		},
		"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=pcharge,c=1] run tag @s remove pcharge",
						"execute as @e[family=!player,tag=pcharge,c=1] run tag @s remove pcharge"
					]
				}
			},
			"remove_katana": {
				"add": {
					"component_groups": [
						"despawn"
					]
				}
			}
		}
	}
}