{
  "format_version": "1.18.20",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:turtle",
      "spawn_category": "creature",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },

    "component_groups": {
      "minecraft:baby": {
        "minecraft:type_family": {
          "family": [ "turtle", "baby_turtle", "mob" ]
        },
        "minecraft:collision_box": {
          "width": 0.6,
          "height": 0.2
        },
        "minecraft:underwater_movement": {
          "value": 0.06
        },
        "minecraft:is_baby": {
        },
        "minecraft:scale": {
          "value": 0.16
        },
        "minecraft:behavior.move_to_water": {
          "priority": 1,
          "search_range": 15,
          "search_height": 5,
          "goal_radius": 0.1
        },
        "minecraft:ageable": {
          "duration": 1200,
          "feed_items": [
            "seagrass"
          ],
          "drop_items": [
            "turtle_shell_piece"
          ],
          "grow_up": {
            "event": "minecraft:ageable_grow_up",
            "target": "self"
          }
        }
      },

      "minecraft:adult": {
        "minecraft:experience_reward": {
          "on_bred": "Math.Random(1,7)",
          "on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
        },
        "minecraft:type_family": {
          "family": [ "turtle", "mob" ]
        },
        "minecraft:collision_box": {
          "width": 1.2,
          "height": 0.4
        },
        "minecraft:underwater_movement": {
          "value": 0.12
        },
        "minecraft:loot": {
          "table": "loot_tables/entities/sea_turtle.json"
        },
        "minecraft:breedable": {
          "require_tame": false,
          "causes_pregnancy": true,
          "breeds_with": {
            "mate_type": "minecraft:turtle",
            "baby_type": "minecraft:turtle",
            "breed_event": {
              "event": "minecraft:become_pregnant",
              "target": "self"
            }
          },
          "breed_items": [
            "seagrass"
          ]
        },
        "minecraft:behavior.breed": {
          "priority": 2,
          "speed_multiplier": 1.0
        },
        "minecraft:behavior.move_to_land": {
          "priority": 6,
          "search_range": 16,
          "search_height": 5,
          "goal_radius": 0.5
        },
        "minecraft:behavior.random_stroll": {
          "priority": 9,
          "interval": 100
        }
      },

      "minecraft:pregnant": {
        "minecraft:behavior.go_home": {
          "priority": 1,
          "speed_multiplier": 1.0,
          "interval": 700,
          "goal_radius": 4.0,
          "on_home": [
            {
              "event": "minecraft:go_lay_egg",
              "target": "self"
            }
          ]
        }
      },

      "minecraft:wants_to_lay_egg": {
        "minecraft:behavior.lay_egg": {
          "priority": 1,
          "speed_multiplier": 1.0,
          "search_range": 16,
          "search_height": 4,
          "goal_radius": 1.5,
          "on_lay": {
            "event": "minecraft:laid_egg",
            "target": "self"
          }
        }
      }
    },

    "components": {
      "minecraft:is_hidden_when_invisible": {
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0,
        "breathes_water": true,
        "breathes_air": true,
        "generates_bubbles": false
      },
      "minecraft:nameable": {
      },
      "minecraft:health": {
        "value": 30
      },
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "lightning",
          "deals_damage": true,
          "damage_multiplier": 2000.0
        }
      },
      "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.1
      },
      "minecraft:water_movement": {
        "drag_factor": 0.9
      },
      "minecraft:navigation.generic": {
        "is_amphibious": true,
        "can_path_over_water": false,
        "can_swim": true,
        "can_walk": true,
        "can_sink": false,
        "avoid_damage_blocks": true
      },
      "minecraft:movement.amphibious": {
        "max_turn": 5.0
      },
      "minecraft:jump.static": {
      },
      "minecraft:physics": {
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:home": {
      },
      "minecraft:follow_range": {
        "value": 1024
      },
      "minecraft:despawn": {
        "despawn_from_distance": {}
      },

      "minecraft:behavior.panic": {
        "priority": 0,
        "prefer_water": true,
        "speed_multiplier": 1.2
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.tempt": {
        "priority": 3,
        "speed_multiplier": 1.1,
        "can_tempt_vertically": true,
        "items": [
          "seagrass"
        ]
      },
      "minecraft:behavior.move_to_water": {
        "priority": 4,
        "search_range": 16,
        "search_height": 5,
        "goal_radius": 1.5
      },
      "minecraft:behavior.random_swim": {
        "priority": 7,
        "interval": 0,
        "xz_dist": 30,
        "y_dist": 15
      },
      "minecraft:behavior.look_at_player": {
        "priority": 8,
        "target_distance": 6.0,
        "probability": 0.02
      },
      "minecraft:conditional_bandwidth_optimization": {
      }
    },

    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 9,
            "add": {
              "component_groups": [
                "minecraft:adult"
              ]
            }
          },
          {
            "weight": 1,
            "add": {
              "component_groups": [
                "minecraft:baby"
              ]
            }
          }
        ]
      },

      "minecraft:entity_born": {
        "add": {
          "component_groups": [
            "minecraft:baby"
          ]
        }
      },

      "minecraft:ageable_grow_up": {
        "remove": {
          "component_groups": [
            "minecraft:baby"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:adult"
          ]
        }
      },

      "minecraft:become_pregnant": {
        "add": {
          "component_groups": [
            "minecraft:pregnant"
          ]
        }
      },

      "minecraft:go_lay_egg": {
        "add": {
          "component_groups": [
            "minecraft:wants_to_lay_egg"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:pregnant"
          ]
        }
      },

      "minecraft:laid_egg": {
        "remove": {
          "component_groups": [
            "minecraft:wants_to_lay_egg"
          ]
        }
      }
    }
  }
}
