{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:drowned",
      "is_experimental": false,
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "monster"
    },
    "components": {
      "minecraft:behavior.equip_item": {
        "priority": 3
      },
      "minecraft:behavior.flee_sun": {
        "priority": 2,
        "speed_multiplier": 1
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.look_at_player": {
        "look_time": {
          "min": 1,
          "max": 2
        },
        "look_distance": 6,
        "priority": 8
      },
      "minecraft:behavior.nearest_attackable_target": {
        "reselect_targets": true,
        "must_see": true,
        "within_radius": 12,
        "must_see_forget_duration": 17,
        "persist_time": 0.5,
        "entity_types": [
          {
            "filters": {
              "AND": [
                {
                  "OR": [
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "player"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "snowgolem"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "irongolem"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "axolotl"
                    }
                  ]
                },
                {
                  "OR": [
                    {
                      "test": "in_water",
                      "subject": 1,
                      "operator": 0,
                      "value": true
                    },
                    {
                      "test": "is_daytime",
                      "subject": 0,
                      "operator": 0,
                      "value": false
                    }
                  ]
                }
              ]
            },
            "max_dist": 20
          },
          {
            "filters": {
              "AND": [
                {
                  "OR": [
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "villager"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "wandering_trader"
                    }
                  ]
                },
                {
                  "OR": [
                    {
                      "test": "in_water",
                      "subject": 1,
                      "operator": 0,
                      "value": true
                    },
                    {
                      "test": "is_daytime",
                      "subject": 0,
                      "operator": 0,
                      "value": false
                    }
                  ]
                }
              ]
            },
            "max_dist": 20,
            "must_see": false
          },
          {
            "filters": {
              "AND": [
                {
                  "test": "is_family",
                  "subject": 1,
                  "operator": 0,
                  "value": "baby_turtle"
                },
                {
                  "test": "in_water",
                  "subject": 1,
                  "operator": 1,
                  "value": true
                }
              ]
            },
            "max_dist": 20
          }
        ],
        "priority": 2
      },
      "minecraft:behavior.pickup_items": {
        "can_pickup_any_item": true,
        "excluded_items": [
          "minecraft:glow_ink_sac"
        ],
        "pickup_based_on_chance": true,
        "goal_radius": 2,
        "priority": 6,
        "max_dist": 3,
        "speed_multiplier": 1
      },
      "minecraft:behavior.random_look_around": {
        "priority": 9
      },
      "minecraft:behavior.random_stroll": {
        "priority": 7,
        "speed_multiplier": 1
      },
      "minecraft:behavior.stomp_turtle_egg": {
        "goal_radius": 1.14,
        "priority": 4,
        "search_height": 2,
        "interval": 20,
        "search_range": 10,
        "speed_multiplier": 1
      },
      "minecraft:breathable": {
        "breathes_air": true,
        "breathes_water": true,
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:burns_in_daylight": {},
      "minecraft:can_climb": {},
      "minecraft:collision_box": {
        "height": 1.9,
        "width": 0.6
      },
      "minecraft:conditional_bandwidth_optimization": {},
      "minecraft:despawn": {
        "despawn_from_distance": {}
      },
      "minecraft:equip_item": {
        "excluded_items": [
          {
            "item": "minecraft:banner:15"
          }
        ]
      },
      "minecraft:health": {
        "max": 20,
        "value": 20
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "cause": "lava",
            "damage_per_tick": 4,
            "filters": {
              "operator": "==",
              "test": "in_lava",
              "subject": "self",
              "value": true
            }
          }
        ]
      },
      "minecraft:jump.static": {},
      "minecraft:movement": {
        "value": 0.23
      },
      "minecraft:movement.generic": {},
      "minecraft:nameable": {},
      "minecraft:navigation.generic": {
        "avoid_sun": true,
        "can_break_doors": true,
        "is_amphibious": true,
        "can_path_over_water": false,
        "can_swim": false,
        "can_walk": true,
        "using_door_annotation": true
      },
      "minecraft:on_target_acquired": {
        "event": "minecraft:has_target",
        "target": "self"
      },
      "minecraft:on_target_escape": {
        "event": "minecraft:lost_target",
        "target": "self"
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:shareables": {
        "items": [
          {
            "item": "minecraft:nautilus_shell",
            "priority": 0,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:trident",
            "priority": 1,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:netherite_sword",
            "priority": 2,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:diamond_sword",
            "priority": 3,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:iron_sword",
            "priority": 4,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:stone_sword",
            "priority": 5,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:golden_sword",
            "priority": 6,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:wooden_sword",
            "priority": 7,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:netherite_helmet",
            "priority": 0,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:diamond_helmet",
            "priority": 1,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:iron_helmet",
            "priority": 2,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:chainmail_helmet",
            "priority": 3,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:golden_helmet",
            "priority": 4,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:leather_helmet",
            "priority": 5,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:turtle_helmet",
            "priority": 6,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:skull:0",
            "priority": 7,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:skull:1",
            "priority": 7,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:carved_pumpkin",
            "priority": 7,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:netherite_chestplate",
            "priority": 0,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:diamond_chestplate",
            "priority": 1,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:iron_chestplate",
            "priority": 2,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:chainmail_chestplate",
            "priority": 3,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:golden_chestplate",
            "priority": 4,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:leather_chestplate",
            "priority": 5,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:netherite_leggings",
            "priority": 0,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:diamond_leggings",
            "priority": 1,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:iron_leggings",
            "priority": 2,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:chainmail_leggings",
            "priority": 3,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:golden_leggings",
            "priority": 4,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:leather_leggings",
            "priority": 5,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:netherite_boots",
            "priority": 0,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:diamond_boots",
            "priority": 1,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:iron_boots",
            "priority": 2,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:chainmail_boots",
            "priority": 3,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:golden_boots",
            "priority": 4,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:leather_boots",
            "priority": 5,
            "surplus_amount": 1,
            "want_amount": 1
          }
        ],
        "singular_pickup": true
      },
      // Zombie Components
      "minecraft:type_family": {
        "family": [
          "drowned",
          "zombie",
          "undead",
          "monster",
          "mob"
        ]
      },
      "minecraft:underwater_movement": {
        "value": 0.06
      }
    },
    "component_groups": {
      "minecraft:adult_drowned": {
        "minecraft:experience_reward": {
          "on_death": {
            "expression": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0",
            "version": 12
          }
        },
        "minecraft:loot": {
          "table": "loot_tables/entities/drowned.json"
        }
      },
      "minecraft:baby_drowned": {
        "minecraft:experience_reward": {
          "on_death": {
            "expression": "query.last_hit_by_player ? 12 + (query.equipment_count * Math.Random(1,3)) : 0",
            "version": 12
          }
        },
        "minecraft:is_baby": {},
        "minecraft:movement": {
          "value": 0.35
        },
        "minecraft:scale": {
          "value": 0.5
        },
        "minecraft:underwater_movement": {
          "value": 0.08
        }
      },
      "minecraft:can_break_doors": {
        "minecraft:annotation.break_door": {}
      },
      "minecraft:hunter_mode": {
        "minecraft:navigation.generic": {
          "avoid_sun": true,
          "can_break_doors": true,
          "is_amphibious": true,
          "can_path_over_water": false,
          "can_swim": true,
          "can_walk": true
        }
      },
      "minecraft:ranged_equipment": {
        "minecraft:equipment": {
          "slot_drop_chance": [
            {
              "drop_chance": 1,
              "slot": "slot.weapon.offhand"
            }
          ],
          "table": "loot_tables/entities/drowned_ranged_equipment.json"
        }
      },
      "minecraft:melee_equipment": {
        "minecraft:equipment": {
          "slot_drop_chance": [
            {
              "drop_chance": 1,
              "slot": "slot.weapon.offhand"
            }
          ],
          "table": "loot_tables/entities/drowned_equipment.json"
        }
      },
      "minecraft:melee_mode": {
        "minecraft:attack": {
          "damage": 3
        },
        "minecraft:behavior.melee_box_attack": {
          "can_spread_on_fire": true,
          "require_complete_path": true,
          "priority": 3
        }
      },
      "minecraft:mode_switcher": {
        "minecraft:target_nearby_sensor": {
          "inside_range": 3,
          "on_inside_range": {
            "event": "minecraft:switch_to_melee",
            "target": "self"
          },
          "on_outside_range": {
            "event": "minecraft:switch_to_ranged",
            "target": "self"
          },
          "outside_range": 5
        }
      },
      "minecraft:ranged_mode": {
        "minecraft:behavior.ranged_attack": {
          "attack_interval_max": 3,
          "attack_interval_min": 1,
          "attack_radius": 10,
          "priority": 3,
          "swing": true
        },
        "minecraft:shooter": {
          "def": "minecraft:thrown_trident",
          "sound": "item.trident.throw"
        }
      },
      "minecraft:wander_mode": {
        "minecraft:navigation.generic": {
          "avoid_sun": true,
          "can_break_doors": true,
          "is_amphibious": true,
          "can_path_over_water": false,
          "can_swim": false,
          "can_walk": true
        }
      }
    },
    "events": {
      "minecraft:switch_to_melee": {
        "add": {
          "component_groups": [
            "minecraft:melee_mode"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:ranged_mode"
          ]
        }
      },
      "minecraft:as_adult": {
        "add": {
          "component_groups": [
            "minecraft:melee_equipment",
            "minecraft:melee_mode",
            "minecraft:adult_drowned"
          ]
        }
      },
      "minecraft:as_baby": {
        "add": {
          "component_groups": [
            "minecraft:melee_equipment",
            "minecraft:melee_mode",
            "minecraft:baby_drowned"
          ]
        }
      },
      "minecraft:switch_to_ranged": {
        "add": {
          "component_groups": [
            "minecraft:ranged_mode"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:melee_mode"
          ]
        }
      },
      "minecraft:lost_target": {
        "add": {
          "component_groups": [
            "minecraft:wander_mode"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:hunter_mode"
          ]
        }
      },
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "minecraft:mode_switcher",
                    "minecraft:ranged_equipment",
                    "minecraft:ranged_mode",
                    "minecraft:adult_drowned"
                  ]
                },
                "remove": {},
                "weight": 15
              },
              {
                "randomize": [
                  {
                    "add": {
                      "component_groups": [
                        "minecraft:melee_equipment",
                        "minecraft:melee_mode",
                        "minecraft:adult_drowned"
                      ]
                    },
                    "remove": {},
                    "weight": 95
                  },
                  {
                    "add": {
                      "component_groups": [
                        "minecraft:melee_equipment",
                        "minecraft:melee_mode",
                        "minecraft:baby_drowned"
                      ]
                    },
                    "remove": {},
                    "weight": 5
                  }
                ],
                "weight": 85
              }
            ]
          },
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "minecraft:can_break_doors"
                  ]
                },
                "weight": 10
              },
              {
                "weight": 90
              }
            ]
          }
        ]
      },
      "minecraft:has_target": {
        "add": {
          "component_groups": [
            "minecraft:hunter_mode"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:wander_mode"
          ]
        }
      }
    }
  }
}