{
	"format_version": "1.16.0",
	"minecraft:entity": {
		"description": {
			"identifier": "minecraft:phantom",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false,
			"properties": {
				"ldz:ice_overlay": {
					"type": "bool",
					"client_sync": true,
					"default": false
				}
			},
			"animations": {
				"ctrl.ice_timer": "controller.animation.vanilla.ice_timer",
				"ice_timer": "animation.vanilla.ice_timer",
				"ice_damage": "animation.vanilla.ice_damage"
			},
			"scripts": {
				"animate": [
					"ctrl.ice_timer"
				]
			}
		},
		"component_groups": {
			"ice_overlay": {
				"minecraft:is_shaking": {}
			},
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			}
		},
		"components": {
			"minecraft:is_hidden_when_invisible": {},
			"minecraft:experience_reward": {
				"on_death": "query.last_hit_by_player ? 5 : 0"
			},
			"minecraft:type_family": {
				"family": [
					"phantom",
					"undead",
					"monster",
					"mob",
					"flight_mob"
				]
			},
			"minecraft:loot": {
				"table": "loot_tables/entities/phantom.json"
			},
			"minecraft:nameable": {},
			"minecraft:health": {
				"value": 20,
				"max": 20
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:physics": {
				"has_gravity": false
			},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:game_event_movement_tracking": {
				"emit_flap": true
			},
			"minecraft:attack": {
				"damage": 6
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0,
				"breathes_air": true,
				"breathes_water": false
			},
			"minecraft:collision_box": {
				"width": 0.9,
				"height": 0.5
			},
			"minecraft:movement": {
				"value": 1.8
			},
			"minecraft:movement.glide": {
				"start_speed": 0.1,
				"speed_when_turning": 0.2
			},
			"minecraft:burns_in_daylight": {},
			"minecraft:follow_range": {
				"value": 64,
				"max": 64
			},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:behavior.avoid_mob_type": {
				"priority": 0,
				"max_dist": 16,
				"ignore_visibility": true,
				"entity_types": [
					{
						"filters": {
							"any_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "ocelot"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "cat"
								}
							]
						},
						"max_dist": 16
					}
				]
			},
			"minecraft:behavior.nearest_attackable_target": {
				"priority": 1,
				"reselect_targets": true,
				"scan_interval": 20,
				"within_radius": 64,
				"must_see_forget_duration": 0.5,
				"target_search_height": 80,
				"entity_types": [
					{
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "player"
						},
						"max_dist": 64
					}
				]
			},
			"minecraft:behavior.swoop_attack": {
				"priority": 2,
				"damage_reach": 0.2,
				"speed_multiplier": 1,
				"delay_range": [
					10,
					20
				]
			},
			"minecraft:behavior.circle_around_anchor": {
				"priority": 3,
				"radius_change": 1,
				"radius_adjustment_chance": 0.004,
				"height_adjustment_chance": 0.002857,
				"goal_radius": 1,
				"angle_change": 15,
				"radius_range": [
					5,
					15
				],
				"height_offset_range": [
					-4,
					5
				],
				"height_above_target_range": [
					20,
					40
				]
			}
		},
		"events": {
			"set_ice_overlay_to_true": {
				"set_property": {
					"ldz:ice_overlay": true
				},
				"add": {
					"component_groups": [
						"ice_overlay"
					]
				}
			},
			"set_ice_overlay_to_false": {
				"set_property": {
					"ldz:ice_overlay": false
				},
				"remove": {
					"component_groups": [
						"ice_overlay"
					]
				}
			},
			"despawn": {
				"add": {
					"component_groups": [
						"instant_despawn"
					]
				}
			}
		}
	}
}