{
  "format_version": "1.12.0",
  "minecraft:entity": {
    "description": {
      "identifier": "mutant:drowned_minion",
   "runtime_identifier": "minecraft:drowned",
   "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
        
      "minecraft:size_baby": {
        "minecraft:scale": {
          "value": 0.5
        }
      },
        

         
      "minecraft:0_baby": {
        "minecraft:scale": {
          "value": 0.0
        },
        "minecraft:attack_cooldown": {
          "attack_cooldown_time": [ 0.1, 0.1 ],
          "attack_cooldown_complete_event": {
            "event": "minecraft:scale_baby",
            "target": "self"
          }
        }
        },
        

         
      "minecraft:scale_baby": {
        "minecraft:scale_by_age": {
          "start_scale": 0.0,
          "end_scale": 0.5
        },
        "minecraft:attack_cooldown": {
          "attack_cooldown_time": [ 0.1, 0.1 ],
          "attack_cooldown_complete_event": {
            "event": "minecraft:start_baby",
            "target": "self"
          }
        }
        },
      "minecraft:size_adult": {
        "minecraft:scale": {
          "value": 1
        }
       },
         

        
      "minecraft:0_adult": {
        "minecraft:scale": {
          "value": 0.0
        },
        "minecraft:attack_cooldown": {
          "attack_cooldown_time": [ 0.1, 0.1 ],
          "attack_cooldown_complete_event": {
            "event": "minecraft:scale_adult",
            "target": "self"
          }
        }
        },
         
         

      "minecraft:scale_adult": {
        "minecraft:scale_by_age": {
          "start_scale": 0.0,
          "end_scale": 1.0
        },
        "minecraft:attack_cooldown": {
          "attack_cooldown_time": [ 0.1, 0.1 ],
          "attack_cooldown_complete_event": {
            "event": "minecraft:start_adult",
            "target": "self"
          }
        }
        },
      "roaring": {


			"minecraft:damage_sensor": {
					"deals_damage": false
				},
        "minecraft:behavior.knockback_roar": {
          "priority": 1,
          "duration": 2.5,
          "attack_time": 5.25,
          "knockback_damage": 1,
          "knockback_strength": 1,
          "knockback_range": 1,
          "knockback_filters": {
            "test": "is_family",
            "subject": "other",
            "operator": "!=",
            "value": "mzombie"
          },
          "damage_filters": {
            "test": "is_family",
            "subject": "other",
            "operator": "!=",
            "value": "zombie"
          },
          "on_roar_end": {
            "event": "minecraft:end_roar"
          },
          "cooldown_time": 4
        }
      },

      "modeswitch_roaring": {

        "minecraft:equipment": {
          "table": "loot_tables/entities/drowned_ranged_equipment.json",
          "slot_drop_chance": [
            {
              "slot": "slot.weapon.offhand",
              "drop_chance": 1.0
            }
          ]
        },

			"minecraft:damage_sensor": {
					"deals_damage": false
				},
        "minecraft:behavior.knockback_roar": {
          "priority": 1,
          "duration": 2.5,
          "attack_time": 5.25,
          "knockback_damage": 1,
          "knockback_strength": 1,
          "knockback_range": 1,
          "knockback_filters": {
            "test": "is_family",
            "subject": "other",
            "operator": "!=",
            "value": "mzombie"
          },
          "damage_filters": {
            "test": "is_family",
            "subject": "other",
            "operator": "!=",
            "value": "zombie"
          },
          "on_roar_end": {
            "event": "minecraft:end_modeswitch_roar"
          },
          "cooldown_time": 4
        }
      },

      
      "burn": {





      },
      
      "damage": {


			"minecraft:damage_sensor": {
					"deals_damage": true
				}

      },
    
        
      "minecraft:baby_drowned": {
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.5
        },
        "minecraft:movement": {
          "value": {
            "range_min": 0.2925, 
            "range_max": 0.3175
          }
        },
        "minecraft:underwater_movement": {
          "value": 0.08
        }
      },

      "minecraft:adult_drowned": {
       
      },

      "minecraft:mode_switcher": {
        "minecraft:target_nearby_sensor": {
          "inside_range": 3.0,
          "outside_range": 5.0,
          "on_inside_range": {
            "event": "minecraft:switch_to_melee",
            "target": "self"
          },
          "on_outside_range": {
            "event": "minecraft:switch_to_ranged",
            "target": "self"
          }
        },
        "minecraft:equipment": {
          "table": "loot_tables/entities/drowned_ranged_equipment.json",
          "slot_drop_chance": [
            {
              "slot": "slot.weapon.offhand",
              "drop_chance": 1.0
            }
          ]
        }
      },
      "death": {
        "minecraft:health": {
          "value": 1,
          "max": 1
        },
        "minecraft:spell_effects": {

          "add_effects": [
            {
              "effect": "wither",
              "amplifier": 200,
              "visible": false,
              "ambient": false,
              "duration": 99999.0
            },
            {
              "effect": "fatal_poison",
              "amplifier": 200,
              "visible": false,
              "ambient": false,
              "duration": 99999.0
            }

            
          ]
        }
        
      },
      "minecraft:ranged_mode": {
        "minecraft:shooter": {
          "def": "minecraft:thrown_trident"
        },
        "minecraft:behavior.ranged_attack": {
          "priority": 3,
          "attack_interval_min": 1,
          "attack_interval_max": 3,
          "attack_radius": 10
        }
      },

      "minecraft:melee_mode": {
        "minecraft:attack": {
          "damage": 3
        },
        "minecraft:behavior.melee_attack": {
          "priority": 3,
          "speed_multiplier": 1,
          "track_target": false
        },
        "minecraft:equipment": {
          "table": "loot_tables/entities/drowned_equipment.json",
          "slot_drop_chance": [
            {
              "slot": "slot.weapon.offhand",
              "drop_chance": 1.0
            }
          ]
        }
      },

      "minecraft:hunter_mode": {
        "minecraft:navigation.generic": {
          "is_amphibious": true,
          "can_path_over_water": false,
          "can_break_doors": true,
          "can_swim": true,
          "can_walk": true,
          "avoid_sun": true
        }
      },

      "minecraft:wander_mode": {
        "minecraft:navigation.generic": {
          "is_amphibious": true,
          "can_path_over_water": false,
          "can_break_doors": true,
          "can_swim": false,
          "can_walk": true,
          "avoid_sun": true
        }
      }
    },

    "components": {
      "minecraft:nameable": {
      },


      "minecraft:type_family": {
        "family": [ "drowned", "zombie", "undead", "monster" ]
      },
      "minecraft:collision_box": {
        "width": 0.6,
        "height": 1.8
      },
      "minecraft:annotation.break_door": {
      },
      "minecraft:underwater_movement": {
        "value": 0.08
      },
      "minecraft:movement.generic": {
      },
      "minecraft:jump.static": {
      },
      "minecraft:can_climb": {
      },
      "minecraft:health": {
        "value": 20,
        "max": 20
      },
      "minecraft:movement": {
        "value": {
          "range_min": 0.3925, 
          "range_max": 0.4575
        }
      },

      "minecraft:breathable": {
        "totalSupply": 15,
        "suffocateTime": 0,
        "breathesAir": true,
        "breathesWater": true
      },
      "minecraft:navigation.generic": {
        "is_amphibious": true,
        "can_path_over_water": false,
        "can_break_doors": true,
        "can_swim": false,
        "can_walk": true,
        "avoid_sun": true
      },
   "minecraft:timer": {
          "looping": false,
          "time": [18, 22],
          "time_down_event": {
            "event": "death"
          }
        },
      "minecraft:behavior.flee_sun": {
        "priority": 2,
        "speed_multiplier": 1
      },
      "minecraft:behavior.stomp_turtle_egg": {
        "priority": 4,
        "speed_multiplier": 1,
        "search_range": 10,
        "search_height": 3,
        "goal_radius": 1.14,
        "search_count": 4,
        "interval": 20
      },
      "minecraft:behavior.move_towards_restriction": {
        "priority": 5,
        "speed_multiplier": 1
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:behavior.random_stroll": {
        "priority": 6,
        "speed_multiplier": 1
      },
      "minecraft:behavior.look_at_player": {
        "priority": 7,
        "look_distance": 6,
        "probability": 0.02
      },
      "minecraft:behavior.random_look_around": {
        "priority": 7
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1,
        "entity_types": {
          "filters": {
            "test": "is_family",
            "subject": "other",
            "operator": "!=",
            "value": "drowned"
          },
          "max_dist": 64
        }
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 2,
        "within_radius": 12,
        "reselect_targets": true,
        "entity_types": [
          {
            "filters": {
              "all_of": [
                {
                  "any_of": [
                    { "test": "is_family", "subject": "other", "value": "player" },
                    { "test": "is_family", "subject": "other", "value": "snowgolem" },
                    { "test": "is_family", "subject": "other", "value": "irongolem" }
                  ]
                }
              ]
            },
            "max_dist": 20
          },
          {
            "filters": {
              "all_of": [
                {
                  "any_of": [
                    { "test": "is_family", "subject": "other", "value": "villager" },
                    { "test": "is_family", "subject": "other", "value": "wandering_trader" }
                  ]
                }
              ]
            },
            "max_dist": 20,
            "must_see": false
          },
          {
            "filters": {
              "all_of": [
                { "test": "is_family", "subject": "other", "value": "baby_turtle" },
                { "test": "in_water", "subject": "other", "operator": "!=", "value": true }
              ]
            },
            "max_dist": 20
          }
        ],
        "must_see": true
      },
      "minecraft:physics": {
      },
      "minecraft:on_target_acquired": {
        "event": "minecraft:has_target",
        "target": "self"
      },
      "minecraft:on_target_escape": {
        "event": "minecraft:lost_target",
        "target": "self"
      }
    },

    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 35,
            "remove": {
            },
            "add": {
              "component_groups": [

                    "minecraft:melee_mode",
                "minecraft:adult_drowned",
            "minecraft:0_adult",
                  "modeswitch_roaring"  
              ]
            }
          },
          {
            "weight": 75,
            "randomize": [
              {
                "weight": 95,
                "remove": {
                },
                "add": {
                  "component_groups": [
                    "minecraft:melee_mode",
                    "minecraft:adult_drowned",
            "minecraft:0_adult",
                  "roaring"  
                  ]
                }
              },
              {
                "weight": 55,
                "remove": {
                },
                "add": {
                  "component_groups": [
                    "minecraft:melee_mode",
                    "minecraft:baby_drowned",
            "minecraft:0_baby",
                  "roaring"  
                  ]
                }
              }
            ]
          }
        ]
      },
      "from_mdrowned": {
        "randomize": [
          {
            "weight": 35,
            "remove": {
            },
            "add": {
              "component_groups": [

                    "minecraft:melee_mode",
                "minecraft:adult_drowned",
            "minecraft:0_adult",
                  "modeswitch_roaring"  
              ]
            }
          },
          {
            "weight": 75,
            "randomize": [
              {
                "weight": 95,
                "remove": {
                },
                "add": {
                  "component_groups": [
                    "minecraft:melee_mode",
                    "minecraft:adult_drowned",
            "minecraft:0_adult",
                  "roaring"  
                  ]
                }
              },
              {
                "weight": 55,
                "remove": {
                },
                "add": {
                  "component_groups": [
                    "minecraft:melee_mode",
                    "minecraft:baby_drowned",
            "minecraft:0_baby",
                  "roaring"  
                  ]
                }
              }
            ]
          }
        ]
      },
      "minecraft:scale_baby": {
        "add": {
          "component_groups": [
            "minecraft:scale_baby"
        
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:0_baby"
          ]
        }
      },

      "minecraft:start_baby": {
        "remove": {
          "component_groups": [
            "minecraft:scale_baby"
        
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:size_baby"
          ]
        }
      },
   "minecraft:scale_adult": {
        "add": {
          "component_groups": [
            "minecraft:scale_adult"
        
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:0_adult"
          ]
        }
      },

      "minecraft:start_adult": {
        "remove": {
          "component_groups": [
            "minecraft:scale_adult"
        
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:size_adult",
            "minecraft:zombie_calm"
          ]
        }
      },

      "minecraft:on_calm": {
        "remove": {
          "component_groups": [
            "minecraft:zombie_angry",
      "minecraft:zombie_attack"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:zombie_calm"
          ]
        }
      },
      "minecraft:become_angry": {
        "remove": {
          "component_groups": [
            "minecraft:zombie_calm"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:zombie_angry"
          ]
        }
      },


      "minecraft:start_roar": {
        "add": {
          "component_groups": [
            "roaring"
        
          ]
        }

      },
      "minecraft:end_modeswitch_roar": {
        "add": {
          "component_groups": [
            "damage",
            "burn",
                "minecraft:mode_switcher"
                
        
          ]
        },
        "remove": {
          "component_groups": [
            "modeswitch_roaring"
          ]
        }
      },
      "death": {
        "add": {
          "component_groups": [
            "death"
        
          ]
        }
      },
 
      "minecraft:end_roar": {
        "add": {
          "component_groups": [
            "damage",
            "burn"
        
          ]
        },
        "remove": {
          "component_groups": [
            "roaring"
          ]
        }
      },
      
      "minecraft:as_baby": {
        "add": {
          "component_groups": [
            "minecraft:melee_mode",
            "minecraft:baby_drowned"
          ]
        }
      },
      "minecraft:as_adult": {
        "add": {
          "component_groups": [
            "minecraft:melee_mode",
            "minecraft:adult_drowned"
          ]
        }
      }, 
      "minecraft:switch_to_melee": {
        "remove": {
          "component_groups": [
            "minecraft:ranged_mode"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:melee_mode"
          ]
        }
      },
      "minecraft:switch_to_ranged": {
        "remove": {
          "component_groups": [
            "minecraft:melee_mode"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:ranged_mode"
          ]
        }
      },
      "minecraft:has_target": {
        "remove": {
          "component_groups": [
            "minecraft:wander_mode"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:hunter_mode"
          ]
        }
      },
      "minecraft:lost_target": {
        "remove": {
          "component_groups": [
            "minecraft:hunter_mode"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:wander_mode"
          ]
        }
      }
    }
  }
}
