{
	"format_version": "1.16.100",
	"minecraft:entity": {
		"description": {
			"identifier": "cc_fairytales:phoenix",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false
		},
		"component_groups": {
			"fly_behavior": {
				"minecraft:movement.hover": {},
				"minecraft:navigation.hover": {
					"can_path_over_water": true,
					"can_sink": false,
					"can_pass_doors": false,
					"can_path_from_air": true,
					"avoid_water": true,
					"avoid_damage_blocks": true,
					"avoid_sun": false
				},
				"minecraft:flying_speed": {
					"value": 0.25
				},
				"minecraft:behavior.float": {
					"priority": 7
				},
				"minecraft:behavior.random_hover": {
					"priority": 8,
					"xz_dist": 8,
					"y_dist": 8,
					"y_offset": -1,
					"interval": 1,
					"hover_height": [
						0,
						6
					]
				}
			},
			"sensor_golpeo": {
				"minecraft:damage_sensor": {
					"triggers": [
						{
							"on_damage": {
								"filters": {
									"test": "is_family",
									"subject": "other",
									"value": "player"
								},
								"event": "enojado"
							},
							"deals_damage": true
						}
					]
				}
			},
			"ataca": {
				"minecraft:shooter": {
					"def": "cc_fairytales:phoenix_ball"
				},
				"minecraft:behavior.ranged_attack": {
					"priority": 0,
					"burst_shots": 3,
					"burst_interval": 0.1,
					"attack_interval_min": 1.0,
					"attack_interval_max": 3.0,
					"attack_radius": 100.0
				},
				"minecraft:behavior.nearest_attackable_target": {
					"attack_owner": false,
					"must_reach": true,
					"must_see": true,
					"must_see_forget_duration": 3,
					"persist_time": 3,
					"reselect_targets": true,
					"scan_interval": 10,
					"set_persistent": true,
					"target_invisible_multiplier": 0.5,
					"target_search_height": -1,
					"target_sneak_visibility_multiplier": 0.8,
					"entity_types": [
						{
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "player"
							},
							"max_dist": 100
						}
					]
				},
				"minecraft:behavior.move_towards_target": {
					"priority": 2,
					"speed_multiplier": 0.9,
					"within_radius": 15
				}
			},
			"vuela_alto": {
				"minecraft:movement": {
					"value": 0.03
				},
				"minecraft:navigation.float": {
					"can_path_over_water": true
				},
				"minecraft:behavior.float_wander": {
					"priority": 2,
					"must_reach": true
				},
				"minecraft:can_fly": {},
				"minecraft:jump.static": {},
				"minecraft:behavior.float": {
					"priority": 0
				},
				"minecraft:follow_range": {
					"value": 26
				},
				"minecraft:behavior.hurt_by_target": {
					"priority": 1
				}
			},
			"regenero": {
				"minecraft:spell_effects": {
					"add_effects": [
						{
							"effect": "regeneration",
							"duration": 10,
							"amplifier": 2
						}
					]
				}
			}
		},
		"components": {
			"minecraft:environment_sensor": {
				"triggers": [
					{
						"event": "regenerate",
						"filters": {
							"all_of": [
								{
									"test": "actor_health",
									"subject": "self",
									"value": 25,
									"operator": "<="
								}
							]
						}
					}
				]
			},
			"minecraft:fire_immune": {},
			"minecraft:damage_sensor": {
				"triggers": {
					"cause": "fall",
					"deals_damage": false
				}
			},"minecraft:type_family": {
				"family": [
					"mob",
					"phoenix"
				]
			},
			"minecraft:health": {
				"value": 50
			},
			"minecraft:behavior.look_at_player": {
				"priority": 7,
				"look_distance": 8
			},
			"minecraft:collision_box": {
				"width": 1,
				"height": 1
			},
			"minecraft:experience_reward": {
				"on_death": "query.last_hit_by_player ? 15"
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:game_event_movement_tracking": {
				"emit_flap": true
			},"minecraft:loot": {
					"table": "loot_tables/chillcraft/fairy/entities/phoenix.json"
				}
		},
		"events": {
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": [
						"fly_behavior",
						"sensor_golpeo"
					]
				}
			},
			"enojado": {
				"remove": {
					"component_groups": [
						"fly_behavior"
					]
				},
				"add": {
					"component_groups": [
						"ataca",
						"vuela_alto"
					]
				}
			},
			"regenerate": {
				"add": {
					"component_groups": [
						"regenero"
					]
				}
			}
		}
	}
}