{
	"format_version": "1.19.50",
	"minecraft:entity": {
		"description": {
			"identifier": "ldz:player_lord_wisp",
			"is_spawnable": false,
			"is_summonable": true,
			"is_experimental": false,
			"animations": {
				"move_forward": "animation.player_lord_wisp.move_forward",
				"die": "animation.generic.die",
				"sfx": "animation.player_lord_wisp.sfx"
			},
			"properties": {
				"ldz:setup": {
					"type": "bool",
					"default": false,
					"client_sync": true
				},
				"ldz:hits": {
					"type": "int",
					"range": [ 0, 5 ],
					"default": 0,
					"client_sync": true
				},
				"ldz:die": {
					"type": "bool",
					"default": false,
					"client_sync": true
				}
			},
			"scripts": {
				"animate": [
					"sfx",
					{ "die": "q.property('ldz:die')" },
					{ "move_forward": "!q.has_target" }
				]
			}
		},
		"component_groups": {
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			}
		},
		"components": {
			"minecraft:type_family": {
				"family": [
					"ldz",
					"projectile",
					"ender_lord_wisp",
					"player_lord_wisp"
				]
			},
			"minecraft:timer": {
				"time": 10,
				"looping": true,
				"time_down_event": {
					"event": "set_die_to_true"
				}
			},
			"minecraft:environment_sensor": {
				"triggers": [
					{
						"filters": [
							{
								"test": "is_difficulty",
								"value": "peaceful"
							}
						],
						"event": "despawn",
						"target": "self"
					},
					{
						"filters": [
							{
								"test": "int_property",
								"domain": "ldz:hits",
								"operator": "==",
								"value": 5
							}
						],
						"event": "set_die_to_true",
						"target": "self"
					}
				]
			},
			"minecraft:health": {
				"value": 1,
				"max": 1
			},
			"minecraft:attack": {
				"damage": 0
			},
			"minecraft:collision_box": {
				"width": 1,
				"height": 1
			},
			"minecraft:movement": {
				"value": 4
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},
			"minecraft:fire_immune": {},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:behavior.float": {
				"priority": 0
			},
			"minecraft:area_attack": {
				"damage_per_tick": 2,
				"damage_range": 0.5,
				"cause": "entity_attack",
				"entity_filter":{
					"any_of": [
						{
							"test": "is_family",
							"subject": "other",
							"value": "monster"
						}
					]
				}
			},
			"minecraft:behavior.charge_attack": {
				"priority": 2,
				"min_distance": 0.5,
				"speed_multiplier": 2.2,
				"success_rate": 0.75
			},
			"minecraft:behavior.nearest_attackable_target": {
				"priority": 3,
				"entity_types": [
					{
						"filters": {
							"any_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "ender"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "monster"
								}
							]
						},
						"max_dist": 70
					}
				],
				"must_see": true
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 1
			},
			"minecraft:physics": {
				"has_gravity": false,
				"has_collision": false
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:game_event_movement_tracking": {
				"emit_move": false,
				"emit_swim": false
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"on_damage": {
							"filters": {
								"test": "has_damage",
								"subject": "self",
								"value": "suffocation"
							}
						},
						"deals_damage": false
					}
				]
			}
		},
		"events": {
			"set_die_to_true": { 
				"set_property": { "ldz:die": true }
			},
			"add_1_to_hits": {
				"set_property": {
					"ldz:hits": "q.property('ldz:hits') + 1"
				}
			},
			"despawn": {
				"add": {
					"component_groups": [
						"instant_despawn"
					]
				}
			}
		}
	}
}