{
  "format_version": "1.19.0",
  "minecraft:entity": {
    "description": {
      "identifier": "nicothekid:fire_bird",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "component:fire_bird_tameable": {
        "minecraft:tameable": {
          "probability": 0.10,
          "tame_items": [
            "minecraft:torchflower_seeds"
          ],
          "tame_event": {
            "event": "minecraft:on_tame",
            "target": "self"
          }
        }
      },
      "component:fire_bird_wild": {
        "minecraft:health": {
          "value": 16,
          "max": 16
        },
        "minecraft:type_family": {
          "family": [
            "fire_bird",
            "bird",
            "mob"
          ]
        },
        
        "minecraft:despawn": {
          "despawn_from_chance": true,
          "despawn_from_inactivity": true,
          "despawn_from_simulation_edge": true,
          "remove_child_entities": false,
          "min_range_inactivity_timer": 30,
          "min_range_random_chance": 800,
          "despawn_from_distance": {
            "max_distance": 128,
            "min_distance": 32
          }
        },
        "minecraft:flocking": {
          "in_water": false,
          "match_variants": false,
          "use_center_of_mass": false,
          "low_flock_limit": 2,
          "high_flock_limit": 32,
          "goal_weight": 2.0,
          "loner_chance": 0.1,
          "influence_radius": 16.0,
          "breach_influence": 0.0,
          "separation_weight": 0.65,
          "separation_threshold": 0.15,
          "cohesion_weight": 2.25,
          "cohesion_threshold": 1.5,
          "innner_cohesion_threshold": 1.5,
          "min_height": 4.0,
          "max_height": 8.0,
          "block_distance": 1.0,
          "block_weight": 0.75
        },
        "minecraft:behavior.tempt": {
          "priority": 4,
          "can_get_scared": true,
          "can_tempt_vertically": true,
          "can_tempt_while_ridden": false,
          "speed_multiplier": 1.10,
          "within_radius": 16,
          "items": [
            "minecraft:pitcher_pod",
            "minecraft:torchflower_seeds"
          ]
        },
        "minecraft:behavior.avoid_mob_type": {
          "priority": 5,
          "remove_target": false,
          "avoid_target_xz": 16,
          "avoid_target_y": 7,
          "max_dist": 3.0,
          "max_flee": 10.0,
          "sprint_distance": 7.0,
          "sprint_speed_multiplier": 1.1,
          "walk_speed_multiplier": 1.1,
          "entity_types": [
            {
              "must_see": true,
              "reevaluate_description": false,
              "max_dist": 8,
              "walk_speed_multiplier": 1.10,
              "sprint_speed_multiplier": 1.10,
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "monster",
                    "operator": "=="
                  }
                ]
              }
            }
          ]
        }
      },
      "component:fire_bird_tamed": {
        "minecraft:is_tamed": {},
        "minecraft:health": {
          "value": 18,
          "max": 18
        },
        "minecraft:type_family": {
          "family": [
            "fire_bird",
            "bird",
            "player_tamed",
            "mob"
          ]
        },
        
        "minecraft:persistent": {},
        "minecraft:sittable": {
          "sit_event": {
            "event": "minecraft:on_sit",
            "target": "self"
          },
          "stand_event": {
            "event": "minecraft:on_stand",
            "target": "self"
          }
        },
        "minecraft:behavior.stay_while_sitting": {
          "priority": 2
        },
        "minecraft:behavior.tempt": {
          "priority": 4,
          "can_get_scared": false,
          "can_tempt_vertically": true,
          "can_tempt_while_ridden": false,
          "speed_multiplier": 1.20,
          "within_radius": 16,
          "items": [
            "minecraft:pitcher_pod",
            "minecraft:torchflower_seeds"
          ]
        },
        "minecraft:behavior.follow_owner": {
          "priority": 4,
          "can_teleport": true,
          "ignore_vibration": true,
          "max_distance": 60.0,
          "start_distance": 16.0,
          "stop_distance": 4.0,
          "speed_multiplier": 1.10
        },
        "minecraft:behavior.avoid_mob_type": {
          "priority": 5,
          "remove_target": false,
          "avoid_target_xz": 16,
          "avoid_target_y": 7,
          "max_dist": 3.0,
          "max_flee": 10.0,
          "sprint_distance": 7.0,
          "sprint_speed_multiplier": 1.1,
          "walk_speed_multiplier": 1.1,
          "entity_types": [
            {
              "must_see": true,
              "reevaluate_description": false,
              "max_dist": 8,
              "walk_speed_multiplier": 1.10,
              "sprint_speed_multiplier": 1.10,
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "monster",
                    "operator": "=="
                  }
                ]
              }
            }
          ]
        }
      },
      "component:fire_bird_spawn_item": {
        "minecraft:spawn_entity": {
          "entities": {
            "min_wait_time": 900,
            "max_wait_time": 1200,
            "single_use": false,
            "spawn_sound": "plop",
            "spawn_item": "nicothekid:fire_bird_egg",
            "filters": {
              "test": "rider_count",
              "subject": "self",
              "operator": "==",
              "value": 0
            }
          }
        }
      },
      "component:soul_fire_bird_spawn_item": {
        "minecraft:spawn_entity": {
          "entities": {
            "min_wait_time": 900,
            "max_wait_time": 1200,
            "single_use": false,
            "spawn_sound": "plop",
            "spawn_item": "nicothekid:soul_fire_bird_egg",
            "filters": {
              "test": "rider_count",
              "subject": "self",
              "operator": "==",
              "value": 0
            }
          }
        }
      },
      
      "component:fire_bird_adult": {
        "minecraft:scale": {
          "value": 1.1
        },
        
        "minecraft:breedable": {
          "allow_sitting": false,
          "causes_pregnancy": false,
          "inherit_tamed": false,
          "require_full_health": true,
          "require_tame": false,
          "extra_baby_chance": 0,
          "breed_cooldown": 60,
          "breed_items": [
						"minecraft:pitcher_pod"
          ],
          "breeds_with": {
            "mate_type": "nicothekid:fire_bird",
            "baby_type": "nicothekid:fire_bird",
            "breed_event": {
              "event": "minecraft:entity_born",
              "target": "baby"
            }
          }
        },
        "minecraft:behavior.breed": {
          "priority": 3,
          "speed_multiplier": 1.10
        },
        "minecraft:experience_reward": {
          "on_bred": "Math.Random(1,7)",
          "on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
        }
      },
      "component:fire_bird_baby": {
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.7
        },
        
        "minecraft:ageable": {
          "duration": 2000,
          "feed_items": [
            {
              "item": "minecraft:pitcher_pod",
              "growth": 0.20
            },
            {
              "item": "minecraft:torchflower_seeds",
              "growth": 0.20
            }
          ],
          "grow_up": {
            "event": "minecraft:ageable_grow_up",
            "target": "self"
          }
        },
        "minecraft:behavior.follow_parent": {
          "priority": 4,
          "speed_multiplier": 1.10
        }
      },
      
      "component:fire_bird_fire_varaint": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "soul_campfire"
                  },
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "soul_fire"
                  },
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "soul_sand"
                  },
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "soul_soul"
                  }
                ]
              },
              "event": "minecraft:fire_bird_change_to_soul_fire_variant"
            }
          ]
        }
      },
      "component:fire_bird_soul_fire_varaint": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "campfire"
                  },
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "fire"
                  },
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "flowing_lava"
                  },
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "lava"
                  },
                  {
                    "test": "in_block",
                    "subject": "self",
                    "operator": "==",
                    "value": "magma"
                  }
                ]
              },
              "event": "minecraft:fire_bird_change_to_fire_variant"
            }
          ]
        }
      },
      "component:fire_bird_loot": {
        "minecraft:loot": {
          "table": "loot_tables/nicos_mobs/entities/nicothekid_fire_bird.json"
        }
      },
      "component:soul_fire_bird_loot": {
        "minecraft:loot": {
          "table": "loot_tables/nicos_mobs/entities/nicothekid_soul_fire_bird.json"
        }
      }
    },
    "components": {
      "minecraft:balloonable": {
        "mass": 0.4
      },
      "minecraft:can_fly": {},
      "minecraft:collision_box": {
        "width": 0.4,
        "height": 0.4
      },
      "minecraft:fire_immune": {},
      "minecraft:flying_speed": {
        "value": 0.30
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:movement": {
        "value": 0.80
      },
      
      "minecraft:breathable": {
        "breathes_air": true,
        "breathes_lava": true,
        "breathes_solids": false,
        "breathes_water": false,
        "generates_bubbles": false,
        "inhale_time": 0,
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "fall",
            "deals_damage": false,
						"damage_modifier": 0.0,
						"damage_multiplier": 1.0
          }
        ]
      },
      "minecraft:healable": {
        "items": [
          {
            "item": "minecraft:pitcher_pod",
            "heal_amount": 2
          },
          {
            "item": "minecraft:torchflower_seeds",
            "heal_amount": 2
          }
        ]
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_contact_with_water",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "cause": "drowning",
            "damage_per_tick": 1
          }
        ]
      },
      "minecraft:jump.static": {
        "jump_power": 0.42
      },
      "minecraft:leashable": {
        "soft_distance": 4.0,
        "hard_distance": 6.0,
        "max_distance": 10.0
      },
      "minecraft:movement.fly": {
        "max_turn": 30.0
      },
      "minecraft:nameable": {
        "allow_name_tag_renaming": true,
        "always_show": false
      },
      "minecraft:navigation.fly": {
        "avoid_damage_blocks": false,
        "avoid_portals": false,
        "avoid_sun": false,
        "avoid_water": true,
        "can_breach": false,
        "can_break_doors": false,
        "can_jump": true,
        "can_open_doors": false,
        "can_open_iron_doors": false,
        "can_pass_doors": true,
        "can_path_from_air": true,
        "can_path_over_lava": true,
        "can_path_over_water": false,
        "can_sink": false,
        "can_swim": false,
        "can_walk": true,
        "can_walk_in_lava": true,
        "is_amphibious": false,
        "blocks_to_avoid": [
          "minecraft:flowing_water",
          "minecraft:powder_snow",
          "minecraft:water"
        ]
      },
      "minecraft:physics": {
        "has_collision": true,
        "has_gravity": true
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true 
      },

      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.panic": {
        "priority": 1,
        "force": false,
        "ignore_mob_damage": false,
        "prefer_water": false,
        "speed_multiplier": 1.30
      },
      "minecraft:behavior.random_fly": {
        "priority": 6,
        "can_land_on_trees": true,
        "avoid_damage_blocks": true,
        "speed_multiplier": 1.10,
        "xz_dist": 32,
        "y_dist": 16,
        "y_offset": 7
      },
      "minecraft:behavior.random_stroll": {
        "priority": 7,
        "speed_multiplier": 1.10
      },
      "minecraft:behavior.look_at_player": {
        "priority": 8,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 6.0,
        "look_time": [ 2, 4 ]
      },
      "minecraft:behavior.random_look_around": {
        "priority": 9,
        "look_time": [ 2, 4 ]
      },
      
      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 100,
            "add": {
              "component_groups": [
                "component:fire_bird_tameable",
                "component:fire_bird_wild",
                "component:fire_bird_adult",
                "component:fire_bird_fire_varaint",
                "component:fire_bird_loot"
              ]
            }
          },
          {
            "weight": 5,
            "add": {
              "component_groups": [
                "component:fire_bird_wild",
                "component:fire_bird_baby",
                "component:fire_bird_fire_varaint"
              ]
            }
          }
        ]
      },
      "minecraft:entity_born": {
        "sequence": [
          {
            "filters": {
              "any_of": [
                {
                  "test": "has_tag",
                  "subject": "parent",
                  "value": "fire_bird_egg",
                  "operator": "=="
                },
                {
                  "test": "is_variant",
                  "subject": "self",
                  "value": 0,
                  "operator": "=="
                }
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_wild",
                "component:fire_bird_baby",
                "component:fire_bird_fire_varaint"
              ]
            }
          },
          {
            "filters": {
              "any_of": [
                {
                  "test": "has_tag",
                  "subject": "parent",
                  "value": "soul_fire_bird_egg",
                  "operator": "=="
                },
                {
                  "test": "is_variant",
                  "subject": "self",
                  "value": 1,
                  "operator": "=="
                }
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_wild",
                "component:fire_bird_baby",
                "component:fire_bird_soul_fire_varaint"
              ]
            }
          }
        ]
      },
      "minecraft:ageable_grow_up": {
        "sequence": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_variant",
                  "subject": "self",
                  "value": 0,
                  "operator": "=="
                }
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_baby"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_tameable",
                "component:fire_bird_adult",
                "component:fire_bird_loot"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_variant",
                  "subject": "self",
                  "value": 1,
                  "operator": "=="
                }
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_baby"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_tameable",
                "component:fire_bird_adult",
                "component:soul_fire_bird_loot"
              ]
            }
          }
        ]
      },
      "minecraft:on_tame": {
        "sequence": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_variant",
                  "subject": "self",
                  "value": 0,
                  "operator": "=="
                }
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_tameable",
                "component:fire_bird_wild"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_tamed",
                "component:fire_bird_spawn_item"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_variant",
                  "subject": "self",
                  "value": 1,
                  "operator": "=="
                }
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_tameable",
                "component:fire_bird_wild"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_tamed",
                "component:soul_fire_bird_spawn_item"
              ]
            }
          }
        ]
      },
      "minecraft:fire_bird_change_to_soul_fire_variant": {
        "sequence": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_baby",
                  "operator": "=="
                }
              ]
            },
            "run_command": {
              "command": [
                "playsound random.fizz @a[r=5]",
                "particle nicothekid:soul_fire_bird_fire_changing_particle ~~~"
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_fire_varaint"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_soul_fire_varaint"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_tamed",
                  "operator": "=="
                }
              ]
            },
            "run_command": {
              "command": [
                "playsound random.fizz @a[r=5]",
                "particle nicothekid:soul_fire_bird_fire_changing_particle ~~~"
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_fire_varaint",
                "component:fire_bird_loot",
                "component:fire_bird_spawn_item"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_soul_fire_varaint",
                "component:soul_fire_bird_loot",
                "component:soul_fire_bird_spawn_item"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_baby",
                  "operator": "!="
                },
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_tamed",
                  "operator": "!="
                }
              ]
            },
            "run_command": {
              "command": [
                "playsound random.fizz @a[r=5]",
                "particle nicothekid:soul_fire_bird_fire_changing_particle ~~~"
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_fire_varaint",
                "component:fire_bird_loot"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_soul_fire_varaint",
                "component:soul_fire_bird_loot"
              ]
            }
          }
        ]
      },
      "minecraft:fire_bird_change_to_fire_variant": {
        "sequence": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_baby",
                  "operator": "=="
                }
              ]
            },
            "run_command": {
              "command": [
                "playsound random.fizz @a[r=5]",
                "particle nicothekid:fire_bird_fire_changing_particle ~~~"
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_soul_fire_varaint"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_fire_varaint"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_tamed",
                  "operator": "=="
                }
              ]
            },
            "run_command": {
              "command": [
                "playsound random.fizz @a[r=5]",
                "particle nicothekid:fire_bird_fire_changing_particle ~~~"
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_soul_fire_varaint",
                "component:soul_fire_bird_loot",
                "component:soul_fire_bird_spawn_item"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_fire_varaint",
                "component:fire_bird_loot",
                "component:fire_bird_spawn_item"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_baby",
                  "operator": "!="
                },
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_tamed",
                  "operator": "!="
                }
              ]
            },
            "run_command": {
              "command": [
                "playsound random.fizz @a[r=5]",
                "particle nicothekid:fire_bird_fire_changing_particle ~~~"
              ]
            },
            "remove": {
              "component_groups": [
                "component:fire_bird_soul_fire_varaint",
                "component:soul_fire_bird_loot"
              ]
            },
            "add": {
              "component_groups": [
                "component:fire_bird_fire_varaint",
                "component:fire_bird_loot"
              ]
            }
          }
        ]
      },
      
      "from_egg": {
        "add": {
          "component_groups": [
            "component:fire_bird_wild",
            "component:fire_bird_baby",
            "component:fire_bird_fire_varaint"
          ]
        }
      },
      "from_fire_bird_egg": {
        "add": {
          "component_groups": [
            "component:fire_bird_wild",
            "component:fire_bird_baby",
            "component:fire_bird_fire_varaint"
          ]
        }
      }
    }
  }
}
