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