{
	"format_version": "1.19.0",
	"minecraft:entity": {
		"description": {
			"identifier": "minecraft:parrot",
			"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": {}
			},
			"minecraft:parrot_red": {
				"minecraft:variant": {
					"value": 0
				}
			},
			"minecraft:parrot_blue": {
				"minecraft:variant": {
					"value": 1
				}
			},
			"minecraft:parrot_green": {
				"minecraft:variant": {
					"value": 2
				}
			},
			"minecraft:parrot_cyan": {
				"minecraft:variant": {
					"value": 3
				}
			},
			"minecraft:parrot_silver": {
				"minecraft:variant": {
					"value": 4
				}
			},
			"minecraft:parrot_adult": {
				"minecraft:experience_reward": {
					"on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
				},
				"minecraft:loot": {
					"table": "loot_tables/entities/parrot.json"
				}
			},
			"minecraft:parrot_wild": {
				"minecraft:type_family": {
					"family": [
						"parrot_wild",
						"mob"
					]
				},
				"minecraft:tameable": {
					"probability": 0.33,
					"tame_items": [
						"wheat_seeds",
						"pumpkin_seeds",
						"melon_seeds",
						"beetroot_seeds"
					],
					"tame_event": {
						"event": "minecraft:on_tame",
						"target": "self"
					}
				},
				"minecraft:behavior.random_fly": {
					"priority": 2,
					"xz_dist": 15,
					"y_dist": 1,
					"y_offset": 0,
					"speed_multiplier": 1,
					"can_land_on_trees": true,
					"avoid_damage_blocks": true
				},
				"minecraft:behavior.follow_mob": {
					"priority": 3,
					"speed_multiplier": 1,
					"stop_distance": 3,
					"search_range": 20
				}
			},
			"minecraft:parrot_tame": {
				"minecraft:type_family": {
					"family": [
						"parrot_tame",
						"mob"
					]
				},
				"minecraft:is_tamed": {},
				"minecraft:behavior.follow_owner": {
					"priority": 2,
					"speed_multiplier": 1,
					"start_distance": 5,
					"stop_distance": 1
				},
				"minecraft:sittable": {},
				"minecraft:behavior.stay_while_sitting": {
					"priority": 1
				},
				"minecraft:behavior.find_mount": {
					"priority": 3,
					"within_radius": 16,
					"avoid_water": true,
					"start_delay": 100,
					"target_needed": false,
					"mount_distance": 2
				}
			},
			"minecraft:parrot_not_riding_player": {
				"minecraft:entity_sensor": {
					"sensor_range": 2,
					"relative_range": false,
					"event_filters": {
						"all_of": [
							{
								"test": "is_riding",
								"subject": "self",
								"operator": "equals",
								"value": true
							},
							{
								"test": "has_component",
								"subject": "self",
								"operator": "equals",
								"value": "minecraft:behavior.look_at_player"
							}
						]
					},
					"event": "minecraft:on_riding_player"
				},
				"minecraft:behavior.look_at_player": {
					"priority": 1,
					"look_distance": 8
				}
			},
			"minecraft:parrot_riding_player": {
				"minecraft:entity_sensor": {
					"sensor_range": 2,
					"relative_range": false,
					"event_filters": {
						"all_of": [
							{
								"test": "is_riding",
								"subject": "self",
								"operator": "equals",
								"value": false
							},
							{
								"test": "has_component",
								"subject": "self",
								"operator": "not",
								"value": "minecraft:behavior.look_at_player"
							}
						]
					},
					"event": "minecraft:on_not_riding_player"
				}
			},
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			}
		},
		"components": {
			"minecraft:is_hidden_when_invisible": {},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0
			},
			"minecraft:collision_box": {
				"width": 0.5,
				"height": 1
			},
			"minecraft:nameable": {},
			"minecraft:health": {
				"value": 6,
				"max": 6
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:movement": {
				"value": 0.4
			},
			"minecraft:damage_sensor": {
				"triggers": {
					"cause": "fall",
					"deals_damage": false
				}
			},
			"minecraft:jump.static": {},
			"minecraft:can_fly": {},
			"minecraft:navigation.fly": {
				"can_path_over_water": true,
				"can_path_from_air": true
			},
			"minecraft:movement.fly": {},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:behavior.float": {
				"priority": 0
			},
			"minecraft:behavior.panic": {
				"priority": 0,
				"speed_multiplier": 1.25
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:game_event_movement_tracking": {
				"emit_flap": true
			},
			"minecraft:healable": {
				"force_use": true,
				"filters": {
					"test": "is_riding",
					"operator": "!=",
					"value": true
				},
				"items": [
					{
						"item": "cookie",
						"heal_amount": 0,
						"effects": [
							{
								"name": "fatal_poison",
								"chance": 1,
								"duration": 1000,
								"amplifier": 0
							}
						]
					}
				]
			},
			"minecraft:leashable": {
				"soft_distance": 4,
				"hard_distance": 6,
				"max_distance": 10
			},
			"minecraft:balloonable": {}
		},
		"events": {
			"minecraft:entity_spawned": {
				"randomize": [
					{
						"weight": 20,
						"add": {
							"component_groups": [
								"minecraft:parrot_red",
								"minecraft:parrot_adult",
								"minecraft:parrot_wild",
								"minecraft:parrot_not_riding_player"
							]
						}
					},
					{
						"weight": 20,
						"add": {
							"component_groups": [
								"minecraft:parrot_blue",
								"minecraft:parrot_adult",
								"minecraft:parrot_wild",
								"minecraft:parrot_not_riding_player"
							]
						}
					},
					{
						"weight": 20,
						"add": {
							"component_groups": [
								"minecraft:parrot_green",
								"minecraft:parrot_adult",
								"minecraft:parrot_wild",
								"minecraft:parrot_not_riding_player"
							]
						}
					},
					{
						"weight": 20,
						"add": {
							"component_groups": [
								"minecraft:parrot_cyan",
								"minecraft:parrot_adult",
								"minecraft:parrot_wild",
								"minecraft:parrot_not_riding_player"
							]
						}
					},
					{
						"weight": 20,
						"add": {
							"component_groups": [
								"minecraft:parrot_silver",
								"minecraft:parrot_adult",
								"minecraft:parrot_wild",
								"minecraft:parrot_not_riding_player"
							]
						}
					}
				]
			},
			"minecraft:on_tame": {
				"remove": {
					"component_groups": [
						"minecraft:parrot_wild"
					]
				},
				"add": {
					"component_groups": [
						"minecraft:parrot_tame"
					]
				}
			},
			"minecraft:on_riding_player": {
				"remove": {
					"component_groups": [
						"minecraft:parrot_not_riding_player"
					]
				},
				"add": {
					"component_groups": [
						"minecraft:parrot_riding_player"
					]
				}
			},
			"minecraft:on_not_riding_player": {
				"remove": {
					"component_groups": [
						"minecraft:parrot_riding_player"
					]
				},
				"add": {
					"component_groups": [
						"minecraft:parrot_not_riding_player"
					]
				}
			},
			"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"
					]
				}
			}
		}
	}
}