{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:axolotl",
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "axolotls"
    },
    "components": {
      "minecraft:attack": {
        "damage": 2
      },
      "minecraft:behavior.look_at_player": {
        "look_distance": 6,
        "priority": 10
      },
      "minecraft:behavior.melee_box_attack": {
        "on_attack": {
          "event": "killed_enemy_event"
        },
        "on_kill": {
          "event": "killed_enemy_event"
        },
        "priority": 4
      },
      "minecraft:behavior.move_to_water": {
        "goal_radius": 0.1,
        "priority": 6,
        "search_count": 1,
        "search_height": 5,
        "search_range": 16
      },
      "minecraft:behavior.nearest_attackable_target": {
        "reselect_targets": true,
        "must_see": true,
        "within_radius": 20,
        "must_see_forget_duration": 17,
        "entity_types": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "in_water",
                  "subject": "other",
                  "value": true
                },
                {
                  "test": "has_component",
                  "subject": "self",
                  "operator": "!=",
                  "value": "minecraft:attack_cooldown"
                },
                {
                  "any_of": [
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "squid"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "fish"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "tadpole"
                    }
                  ]
                }
              ]
            },
            "max_dist": 8
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "in_water",
                  "subject": "other",
                  "value": true
                },
                {
                  "any_of": [
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "drowned"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "guardian"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "guardian_elder"
                    }
                  ]
                }
              ]
            },
            "max_dist": 8
          }
        ],
        "priority": 3
      },
      "minecraft:behavior.play_dead": {
        "apply_regeneration": true,
        "damage_sources": [
          "contact",
          "entity_attack",
          "entity_explosion",
          "magic",
          "projectile",
          "thorns",
          "wither"
        ],
        "priority": 0,
        "duration": 10,
        "force_below_health": 8,
        "filters": {
          "operator": "==",
          "test": "in_water",
          "value": true
        },
        "random_damage_range": [
          0,
          2
        ],
        "random_start_chance": 0.33
      },
      "minecraft:behavior.random_stroll": {
        "interval": 100,
        "priority": 9
      },
      "minecraft:behavior.random_swim": {
        "interval": 0,
        "xz_dist": 30,
        "priority": 8,
        "y_dist": 15
      },
      "minecraft:behavior.swim_idle": {
        "success_rate": 0.05,
        "priority": 7
      },
      "minecraft:behavior.tempt": {
        "can_tempt_vertically": true,
        "items": [
          "tropical_fish_bucket"
        ],
        "priority": 2,
        "speed_multiplier": 1.1
      },
      "minecraft:breathable": {
        "breathes_air": true,
        "breathes_water": true,
        "suffocate_time": 0,
        "generates_bubbles": false,
        "total_supply": 15
      },
      "minecraft:collision_box": {
        "height": 0.42,
        "width": 0.75
      },
      "minecraft:combat_regeneration": {},
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "lightning",
          "damage_multiplier": 2000,
          "deals_damage": "yes"
        }
      },
      "minecraft:despawn": {
        "despawn_from_distance": {}
      },
      "minecraft:health": {
        "value": 14
      },
      "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": {},
      "minecraft:movement": {
        "value": 0.1
      },
      "minecraft:movement.amphibious": {
        "max_turn": 15
      },
      "minecraft:nameable": {},
      "minecraft:navigation.generic": {
        "avoid_damage_blocks": true,
        "can_path_over_water": true,
        "can_sink": false,
        "can_swim": true,
        "can_walk": true,
        "is_amphibious": true
      },
      "minecraft:offspring": {
        "mutation_factor": {
          "variant": 0.00083 // roughly 1/1200
        },
        "offspring_pairs": {
          "minecraft:axolotl": "minecraft:axolotl"
        }
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:spawn_egg_interaction": {},
      "minecraft:type_family": {
        "family": [
          "aquatic",
          "axolotl",
          "mob"
        ]
      },
      "minecraft:underwater_movement": {
        "value": 0.2
      }
    },
    "component_groups": {
      "axolotl_dried": {
        "minecraft:damage_over_time": {
          "damage_per_hurt": 1,
          "time_between_hurt": 0
        }
      },
      "axolotl_adult": {
        "minecraft:behavior.breed": {
          "priority": 1
        },
        "minecraft:breedable": {
          "breed_items": [
            {
              "item": "tropical_fish_bucket",
              "result_item": "water_bucket:0"
            }
          ],
          "breeds_with": {
            "minecraft:axolotl": {}
          },
          "require_tame": false
        },
        "minecraft:experience_reward": {
          "on_bred": {
            "expression": "Math.Random(1,7)",
            "version": 13
          },
          "on_death": {
            "expression": "query.last_hit_by_player ? Math.Random(1,3) : 0",
            "version": 13
          }
        },
        "minecraft:leashable_to": {}
      },
      "attack_cooldown": {
        "minecraft:attack_cooldown": {
          "attack_cooldown_complete_event": {
            "event": "attack_cooldown_complete_event",
            "target": "self"
          },
          "attack_cooldown_time": 120
        }
      },
      "axolotl_baby": {
        "minecraft:ageable": {
          "duration": 1200,
          "feed_items": [
            {
              "item": "tropical_fish_bucket",
              "result_item": "water_bucket:0"
            }
          ],
          "grow_up": {
            "event": "minecraft:ageable_grow_up",
            "target": "self"
          }
        },
        "minecraft:behavior.follow_parent": {
          "priority": 5,
          "speed_multiplier": 1.1
        },
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.5
        }
      },
      "axolotl_blue": {
        "minecraft:variant": {
          "value": 4
        }
      },
      "axolotl_in_water": {
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "event": "start_drying_out",
              "filters": {
                "operator": "!=",
                "test": "in_water",
                "value": true
              }
            }
          ]
        }
      },
      "axolotl_cyan": {
        "minecraft:variant": {
          "value": 1
        }
      },
      "axolotl_gold": {
        "minecraft:variant": {
          "value": 2
        }
      },
      "axolotl_lucy": {
        "minecraft:variant": {
          "value": 0
        }
      },
      "axolotl_on_land": {
        "minecraft:drying_out_timer": {
          "dried_out_event": {
            "event": "dried_out"
          },
          "recover_after_dried_out_event": {
            "event": "recover_after_dried_out"
          },
          "stopped_drying_out_event": {
            "event": "stop_drying_out"
          },
          "total_time": 300,
          "water_bottle_refill_time": 90
        }
      },
      "axolotl_on_land_in_rain": {
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "event": "start_drying_out",
              "filters": {
                "operator": "!=",
                "test": "in_water_or_rain",
                "value": true
              }
            },
            {
              "event": "enter_water",
              "filters": {
                "operator": "==",
                "test": "in_water",
                "value": true
              }
            }
          ]
        }
      },
      "axolotl_wild": {
        "minecraft:variant": {
          "value": 3
        }
      }
    },
    "events": {
      "attack_cooldown_complete_event": {
        "remove": {
          "component_groups": [
            "attack_cooldown"
          ]
        }
      },
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "axolotl_adult",
                "axolotl_in_water"
              ]
            }
          },
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "axolotl_cyan"
                  ]
                },
                "weight": 25
              },
              {
                "add": {
                  "component_groups": [
                    "axolotl_gold"
                  ]
                },
                "weight": 25
              },
              {
                "add": {
                  "component_groups": [
                    "axolotl_lucy"
                  ]
                },
                "weight": 25
              },
              {
                "add": {
                  "component_groups": [
                    "axolotl_wild"
                  ]
                },
                "weight": 25
              }
            ]
          }
        ]
      },
      "start_drying_out": {
        "add": {
          "component_groups": [
            "axolotl_on_land"
          ]
        },
        "remove": {
          "component_groups": [
            "axolotl_on_land_in_rain",
            "axolotl_in_water"
          ]
        }
      },
      "killed_enemy_event": {
        "add": {
          "component_groups": [
            "attack_cooldown"
          ]
        }
      },
      "dried_out": {
        "add": {
          "component_groups": [
            "axolotl_dried"
          ]
        }
      },
      "enter_water": {
        "add": {
          "component_groups": [
            "axolotl_in_water"
          ]
        },
        "remove": {
          "component_groups": [
            "axolotl_on_land",
            "axolotl_on_land_in_rain",
            "axolotl_dried"
          ]
        }
      },
      "minecraft:ageable_grow_up": {
        "add": {
          "component_groups": [
            "axolotl_adult"
          ]
        },
        "remove": {
          "component_groups": [
            "axolotl_baby"
          ]
        }
      },
      "minecraft:entity_born": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "axolotl_baby",
                "axolotl_in_water"
              ]
            },
            "remove": {
              "component_groups": [
                "axolotl_adult"
              ]
            }
          },
          {
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "value": "minecraft:variant"
            },
            "add": {
              "component_groups": [
                "axolotl_blue"
              ]
            }
          }
        ]
      },
      "recover_after_dried_out": {
        "remove": {
          "component_groups": [
            "axolotl_dried"
          ]
        }
      },
      "stop_drying_out": {
        "add": {
          "component_groups": [
            "axolotl_on_land_in_rain"
          ]
        },
        "remove": {
          "component_groups": [
            "axolotl_on_land",
            "axolotl_dried"
          ]
        }
      }
    }
  }
}