{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:zombie",
      "is_experimental": false,
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "monster"
    },
    "components": {
      "minecraft:annotation.break_door": {},
      "minecraft:attack": {
        "damage": 3
      },
      // Zombie Behaviors
      "minecraft:behavior.equip_item": {
        "priority": 2
      },
      "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.melee_attack": {
        "priority": 3
      },
      "minecraft:behavior.nearest_attackable_target": {
        "reselect_targets": true,
        "must_see": true,
        "within_radius": 25,
        "must_see_forget_duration": 17,
        "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"
                    }
                  ]
                }
              ]
            },
            "max_dist": 35
          },
          {
            "filters": {
              "AND": [
                {
                  "OR": [
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "villager"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "wandering_trader"
                    }
                  ]
                }
              ]
            },
            "max_dist": 35,
            "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": 35
          }
        ],
        "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:environment_sensor": {
        "triggers": {
          "event": "minecraft:start_transforming",
          "filters": {
            "operator": "==",
            "test": "is_underwater",
            "value": true
          }
        }
      },
      "minecraft:equip_item": {},
      "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:is_hidden_when_invisible": {},
      "minecraft:jump.static": {},
      "minecraft:loot": {
        "table": "loot_tables/entities/zombie.json"
      },
      "minecraft:movement.basic": {},
      "minecraft:nameable": {},
      "minecraft:navigation.walk": {
        "can_break_doors": true,
        "is_amphibious": true,
        "can_pass_doors": true,
        "can_walk": true,
        "using_door_annotation": true
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:shareables": {
        "items": [
          {
            "item": "minecraft:netherite_sword",
            "priority": 0,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:diamond_sword",
            "priority": 1,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:iron_sword",
            "priority": 2,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:stone_sword",
            "priority": 3,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:golden_sword",
            "priority": 4,
            "surplus_amount": 1,
            "want_amount": 1
          },
          {
            "item": "minecraft:wooden_sword",
            "priority": 5,
            "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
          }
        ]
      },
      // Zombie Components
      "minecraft:type_family": {
        "family": [
          "zombie",
          "undead",
          "monster",
          "mob"
        ]
      }
    },
    "component_groups": {
      "minecraft:can_have_equipment": {
        "minecraft:equipment": {
          "table": "loot_tables/entities/zombie_equipment.json"
        }
      },
      "minecraft:convert_to_baby_drowned": {
        "minecraft:is_shaking": {},
        "minecraft:transformation": {
          "delay": {
            "value": 15
          },
          "drop_equipment": true,
          "into": "minecraft:drowned<minecraft:as_baby>",
          "transformation_sound": "convert_to_drowned"
        }
      },
      "minecraft:look_to_start_drowned_transformation": {
        "minecraft:environment_sensor": {
          "triggers": {
            "event": "minecraft:start_transforming",
            "filters": {
              "operator": "==",
              "test": "is_underwater",
              "subject": "self",
              "value": true
            }
          }
        }
      },
      "minecraft:convert_to_drowned": {
        "minecraft:is_shaking": {},
        "minecraft:transformation": {
          "delay": {
            "value": 15
          },
          "drop_equipment": true,
          "into": "minecraft:drowned<minecraft:as_adult>",
          "transformation_sound": "convert_to_drowned"
        }
      },
      "minecraft:start_drowned_transformation": {
        "minecraft:environment_sensor": {
          "triggers": {
            "event": "minecraft:stop_transforming",
            "filters": {
              "operator": "==",
              "test": "is_underwater",
              "subject": "self",
              "value": false
            }
          }
        },
        "minecraft:timer": {
          "looping": false,
          "time": 30,
          "time_down_event": {
            "event": "minecraft:convert_to_drowned"
          }
        }
      },
      "minecraft:zombie_adult": {
        "minecraft:behavior.mount_pathing": {
          "priority": 2,
          "target_dist": 0,
          "speed_multiplier": 1.25,
          "track_target": true
        },
        "minecraft:experience_reward": {
          "on_death": {
            "expression": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0",
            "version": 1
          }
        },
        "minecraft:movement": {
          "value": 0.23
        },
        "minecraft:rideable": {
          "family_types": [
            "zombie"
          ],
          "seat_count": 1,
          "seats": {
            "lock_rider_rotation": 0,
            "position": [
              0,
              1.1,
              -0.35
            ]
          }
        }
      },
      "minecraft:zombie_baby": {
        "minecraft:experience_reward": {
          "on_death": {
            "expression": "query.last_hit_by_player ? 12 + (query.equipment_count * Math.Random(1,3)) : 0",
            "version": 1
          }
        },
        "minecraft:is_baby": {},
        "minecraft:movement": {
          "value": 0.35
        },
        "minecraft:scale": {
          "value": 0.5
        }
      },
      "minecraft:zombie_jockey": {
        "minecraft:behavior.find_mount": {
          "max_failed_attempts": 20,
          "priority": 1,
          "start_delay": 15,
          "within_radius": 16
        }
      }
    },
    "events": {
      "minecraft:as_adult": {
        "add": {
          "component_groups": [
            "minecraft:zombie_adult"
          ]
        }
      },
      "minecraft:stop_transforming": {
        "add": {
          "component_groups": [
            "minecraft:look_to_start_drowned_transformation"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:start_drowned_transformation"
          ]
        }
      },
      "minecraft:start_transforming": {
        "add": {
          "component_groups": [
            "minecraft:start_drowned_transformation"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:look_to_start_drowned_transformation"
          ]
        }
      },
      "minecraft:as_baby": {
        "add": {
          "component_groups": [
            "minecraft:zombie_baby"
          ]
        }
      },
      "minecraft:convert_to_drowned": {
        "sequence": [
          {
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "value": "minecraft:is_baby"
            },
            "add": {
              "component_groups": [
                "minecraft:convert_to_drowned"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:start_drowned_transformation"
              ]
            }
          },
          {
            "filters": {
              "test": "has_component",
              "value": "minecraft:is_baby"
            },
            "add": {
              "component_groups": [
                "minecraft:convert_to_baby_drowned"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:start_drowned_transformation"
              ]
            }
          }
        ]
      },
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "add": {
              "component_groups": [
                "minecraft:zombie_adult",
                "minecraft:can_have_equipment"
              ]
            },
            "remove": {},
            "weight": 380
          },
          {
            "add": {
              "component_groups": [
                "minecraft:zombie_baby",
                "minecraft:can_have_equipment"
              ]
            },
            "remove": {},
            "weight": 17
          },
          {
            "add": {
              "component_groups": [
                "minecraft:zombie_baby",
                "minecraft:zombie_jockey",
                "minecraft:can_have_equipment"
              ]
            },
            "remove": {},
            "weight": 3
          }
        ]
      }
    }
  }
}