{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:zombie_villager",
      "is_experimental": false,
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "monster"
    },
    "components": {
      "minecraft:annotation.break_door": {},
      "minecraft:attack": {
        "damage": 3
      },
      "minecraft:behavior.equip_item": {
        "priority": 3
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.look_at_player": {
        "look_time": {
          "min": 1,
          "max": 2
        },
        "look_distance": 6,
        "priority": 10
      },
      // Zombie_villager Behaviors
      "minecraft:behavior.melee_attack": {
        "priority": 6
      },
      "minecraft:behavior.nearest_attackable_target": {
        "reselect_targets": true,
        "must_see": true,
        "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,
        "goal_radius": 2,
        "priority": 8,
        "max_dist": 3,
        "speed_multiplier": 1,
        "pickup_based_on_chance": true
      },
      "minecraft:behavior.random_look_around": {
        "priority": 11
      },
      "minecraft:behavior.random_stroll": {
        "priority": 9,
        "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_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": {},
      "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:interact": {
        "interactions": {
          "interact_text": "action.interact.cure",
          // Curing the villager
          "on_interact": {
            "event": "villager_converted",
            "filters": {
              "all_of": [
                {
                  "domain": "hand",
                  "subject": "other",
                  "test": "has_equipment",
                  "value": "golden_apple"
                },
                {
                  "subject": "self",
                  "test": "has_component",
                  "value": "minecraft:effect.weakness"
                }
              ]
            },
            "target": "self"
          },
          "swing": false,
          "use_item": true
        }
      },
      "minecraft:jump.static": {},
      "minecraft:loot": {
        "table": "loot_tables/entities/zombie.json"
      },
      "minecraft:movement.basic": {},
      "minecraft:nameable": {},
      // Zombie_villager Components
      "minecraft:navigation.walk": {
        "avoid_sun": false,
        "can_break_doors": true,
        "is_amphibious": true,
        "can_pass_doors": 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
          }
        ]
      }
    },
    "component_groups": {
      "adult": {
        "minecraft:behavior.mount_pathing": {
          "priority": 5,
          "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": 0
          }
        },
        "minecraft:movement": {
          "value": 0.23
        },
        "minecraft:rideable": {
          "family_types": [
            "zombie"
          ],
          "seat_count": 1,
          "seats": {
            "position": [
              0,
              1.1,
              -0.35
            ]
          }
        }
      },
      "become_zombie_villager_v2": {
        "minecraft:transformation": {
          "into": "minecraft:zombie_villager_v2",
          "keep_level": false
        }
      },
      "armorer": {
        "minecraft:type_family": {
          "family": [
            "armorer",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 3
        }
      },
      "cartographer": {
        "minecraft:type_family": {
          "family": [
            "cartographer",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "baby": {
        "minecraft:experience_reward": {
          "on_death": {
            "expression": "query.last_hit_by_player ? 12 + (query.equipment_count * Math.Random(1,3)) : 0",
            "version": 0
          }
        },
        "minecraft:is_baby": {},
        "minecraft:movement": {
          "value": 0.35
        },
        "minecraft:scale": {
          "value": 0.5
        }
      },
      "weaponsmith": {
        "minecraft:type_family": {
          "family": [
            "weaponsmith",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 3
        }
      },
      "butcher": {
        "minecraft:type_family": {
          "family": [
            "butcher",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 4
        }
      },
      "cleric": {
        "minecraft:type_family": {
          "family": [
            "cleric",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 2
        }
      },
      "farmer": {
        "minecraft:type_family": {
          "family": [
            "farmer",
            "zombie",
            "zombie_villager",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "fisherman": {
        "minecraft:type_family": {
          "family": [
            "fisherman",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "fletcher": {
        "minecraft:type_family": {
          "family": [
            "fletcher",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "from_abandoned_village": {
        "minecraft:behavior.flee_sun": {
          "priority": 4,
          "speed_multiplier": 1
        },
        "minecraft:navigation.walk": {
          "avoid_sun": true,
          "is_amphibious": true,
          "avoid_water": true,
          "can_open_doors": true,
          "can_pass_doors": true
        }
      },
      "jockey": {
        "minecraft:behavior.find_mount": {
          "priority": 1,
          "within_radius": 16
        }
      },
      "leatherworker": {
        "minecraft:type_family": {
          "family": [
            "leatherworker",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 4
        }
      },
      "librarian": {
        "minecraft:type_family": {
          "family": [
            "librarian",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "to_villager": {
        "minecraft:is_shaking": {},
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "duration": 100,
              "effect": "strength"
            },
            {
              "duration": 100,
              "effect": "heal"
            }
          ],
          "remove_effects": "weakness"
        },
        "minecraft:transformation": {
          "begin_transform_sound": "remedy",
          "delay": {
            "block_assist_chance": 0.01,
            "block_radius": 4,
            "block_chance": 0.3,
            "block_types": [
              "minecraft:bed",
              "minecraft:iron_bars"
            ],
            "value": 100
          },
          "into": "minecraft:villager",
          "transformation_sound": "unfect"
        }
      },
      "shepherd": {
        "minecraft:type_family": {
          "family": [
            "shepherd",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "toolsmith": {
        "minecraft:type_family": {
          "family": [
            "toolsmith",
            "zombie_villager",
            "zombie",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 3
        }
      }
    },
    "events": {
      "villager_converted": {
        "add": {
          "component_groups": [
            "to_villager"
          ]
        },
        "remove": {}
      },
      "from_village": {
        "sequence": [
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "adult"
                  ]
                },
                "remove": {},
                "weight": 9500
              },
              {
                "add": {
                  "component_groups": [
                    "baby"
                  ]
                },
                "remove": {},
                "weight": 425
              },
              {
                "add": {
                  "component_groups": [
                    "baby",
                    "jockey"
                  ]
                },
                "remove": {},
                "weight": 75
              }
            ],
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "value": "minecraft:variant"
            }
          },
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "farmer"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "fisherman"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "shepherd"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "fletcher"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "librarian"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "cartographer"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "cleric"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "armorer"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "weaponsmith"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "toolsmith"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "butcher"
                  ]
                },
                "weight": 10
              },
              {
                "add": {
                  "component_groups": [
                    "leatherworker"
                  ]
                },
                "weight": 10
              }
            ],
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "value": "minecraft:variant"
            }
          },
          {
            "add": {
              "component_groups": [
                "from_abandoned_village"
              ]
            }
          }
        ]
      },
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "adult"
                  ]
                },
                "remove": {},
                "weight": 9500
              },
              {
                "add": {
                  "component_groups": [
                    "baby"
                  ]
                },
                "remove": {},
                "weight": 425
              },
              {
                "add": {
                  "component_groups": [
                    "baby",
                    "jockey"
                  ]
                },
                "remove": {},
                "weight": 75
              }
            ],
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "value": "minecraft:variant"
            }
          },
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "farmer"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "fisherman"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "shepherd"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "fletcher"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "librarian"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "cartographer"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "cleric"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "armorer"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "weaponsmith"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "toolsmith"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "butcher"
                  ]
                },
                "weight": 10
              },
              {
                "add": {
                  "component_groups": [
                    "leatherworker"
                  ]
                },
                "weight": 10
              }
            ],
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "value": "minecraft:variant"
            }
          }
        ]
      },
      "minecraft:become_cleric": {
        "add": {
          "component_groups": [
            "cleric"
          ]
        }
      },
      "minecraft:entity_transformed": {
        "filters": {
          "test": "has_component",
          "operator": "!=",
          "value": "minecraft:variant"
        },
        "sequence": [
          // Transform baby villager to baby zombie
          {
            "filters": {
              "subject": "other",
              "test": "has_component",
              "value": "minecraft:is_baby"
            },
            "add": {
              "component_groups": [
                "baby"
              ]
            }
          },
          // Transform adult villager to adult zombie
          {
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "subject": "other",
              "value": "minecraft:is_baby"
            },
            "add": {
              "component_groups": [
                "adult"
              ]
            }
          },
          // Transform farmer zombie to farmer villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "farmer"
            },
            "add": {
              "component_groups": [
                "farmer"
              ]
            }
          },
          // Transform fisherman zombie to fisherman villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "fisherman"
            },
            "add": {
              "component_groups": [
                "fisherman"
              ]
            }
          },
          // Transform shepherd zombie to shepherd villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "shepherd"
            },
            "add": {
              "component_groups": [
                "shepherd"
              ]
            }
          },
          // Transform fletcher zombie to fletcher villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "fletcher"
            },
            "add": {
              "component_groups": [
                "fletcher"
              ]
            }
          },
          // Transform librarian zombie to librarian villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "librarian"
            },
            "add": {
              "component_groups": [
                "librarian"
              ]
            }
          },
          // Transform cartographer zombie to cartographer villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "cartographer"
            },
            "add": {
              "component_groups": [
                "cartographer"
              ]
            }
          },
          // Transform cleric zombie to cleric villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "cleric"
            },
            "add": {
              "component_groups": [
                "cleric"
              ]
            }
          },
          // Transform armorer zombie to armorer villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "armorer"
            },
            "add": {
              "component_groups": [
                "armorer"
              ]
            }
          },
          // Transform weaponsmith zombie to weaponsmith villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "weaponsmith"
            },
            "add": {
              "component_groups": [
                "weaponsmith"
              ]
            }
          },
          // Transform toolsmith zombie to toolsmith villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "toolsmith"
            },
            "add": {
              "component_groups": [
                "toolsmith"
              ]
            }
          },
          // Transform butcher zombie to butcher villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "butcher"
            },
            "add": {
              "component_groups": [
                "butcher"
              ]
            }
          },
          // Transform leatherworker zombie to leatherworker villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "leatherworker"
            },
            "add": {
              "component_groups": [
                "leatherworker"
              ]
            }
          }
        ]
      }
    }
  }
}