{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:villager",
      "is_experimental": false,
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "misc"
    },
    "components": {
      "minecraft:annotation.open_door": {},
      "minecraft:behavior.avoid_mob_type": {
        "entity_types": [
          {
            "filters": {
              "AND": [
                {
                  "OR": [
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "zombie"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "zombie_villager"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "zombie_pigman"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "illager"
                    },
                    {
                      "test": "is_family",
                      "subject": 1,
                      "operator": 0,
                      "value": "vex"
                    }
                  ]
                }
              ]
            },
            "max_dist": 8,
            "walk_speed_multiplier": 0.6,
            "sprint_speed_multiplier": 0.6
          }
        ],
        "priority": 3
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.look_at_player": {
        "look_time": {
          "min": 1,
          "max": 2
        },
        "priority": 12
      },
      "minecraft:behavior.look_at_trading_player": {
        "look_time": {
          "min": 1,
          "max": 2
        },
        "priority": 2
      },
      "minecraft:behavior.move_indoors": {
        "priority": 4,
        "speed_multiplier": 0.8
      },
      "minecraft:behavior.open_door": {
        "close_door_after": true,
        "priority": 6
      },
      "minecraft:behavior.panic": {
        "damage_sources": [
          "all"
        ],
        "priority": 3,
        "speed_multiplier": 0.6
      },
      "minecraft:behavior.pickup_items": {
        "can_pickup_to_hand_or_equipment": false,
        "goal_radius": 2,
        "priority": 9,
        "max_dist": 3,
        "speed_multiplier": 0.5
      },
      "minecraft:behavior.random_stroll": {
        "priority": 11,
        "speed_multiplier": 0.6
      },
      "minecraft:behavior.restrict_open_door": {
        "priority": 5
      },
      "minecraft:behavior.share_items": {
        "entity_types": [
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "villager"
            }
          }
        ],
        "goal_radius": 2,
        "priority": 8,
        "max_dist": 3,
        "speed_multiplier": 0.5
      },
      "minecraft:behavior.trade_with_player": {
        "filters": {
          "all_of": [
            {
              "all_of": [
                {
                  "test": "in_water",
                  "value": false
                }
              ]
            },
            {
              "any_of": [
                {
                  "test": "on_ground",
                  "value": true
                },
                {
                  "test": "is_sleeping",
                  "value": true
                }
              ]
            }
          ]
        },
        "priority": 1
      },
      "minecraft:breathable": {
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:can_climb": {},
      "minecraft:collision_box": {
        "height": 1.9,
        "width": 0.6
      },
      "minecraft:conditional_bandwidth_optimization": {},
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "deals_damage": "no",
            "on_damage": {
              "event": "become_witch",
              "filters": {
                "subject": "other",
                "test": "is_family",
                "value": "lightning"
              }
            }
          },
          {
            "on_damage": {
              "event": "become_zombie",
              "filters": {
                "all_of": [
                  {
                    "test": "has_damage",
                    "value": "fatal"
                  }
                ],
                "any_of": [
                  {
                    "subject": "other",
                    "test": "is_family",
                    "value": "zombie"
                  },
                  {
                    "subject": "other",
                    "test": "is_family",
                    "value": "husk"
                  }
                ]
              }
            }
          }
        ]
      },
      "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:inventory": {
        "inventory_size": 8,
        "private": true
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:jump.static": {},
      "minecraft:movement": {
        "value": 0.5
      },
      "minecraft:movement.basic": {},
      "minecraft:nameable": {},
      "minecraft:navigation.walk": {
        "avoid_water": true,
        "can_open_doors": true,
        "using_door_annotation": true,
        "can_pass_doors": true,
        "can_path_over_water": true,
        "can_walk": true,
        "is_amphibious": true
      },
      "minecraft:persistent": {},
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:type_family": {
        "family": [
          "villager",
          "mob"
        ]
      }
    },
    "component_groups": {
      "adult": {
        "minecraft:behavior.make_love": {
          "priority": 6
        },
        "minecraft:behavior.receive_love": {
          "priority": 7
        }
      },
      "become_zombie": {
        "minecraft:transformation": {
          "into": "minecraft:zombie_villager"
        }
      },
      "armorer": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.armor",
          "table": "trading/armorer_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "blacksmith",
            "armorer",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 3
        }
      },
      "baby": {
        "minecraft:ageable": {
          "duration": 1200,
          "grow_up": {
            "event": "minecraft:ageable_grow_up",
            "target": "self"
          }
        },
        "minecraft:behavior.play": {
          "priority": 8,
          "speed_multiplier": 0.32
        },
        "minecraft:behavior.take_flower": {
          "filters": [
            {
              "all_of": [
                {
                  "test": "is_daytime",
                  "value": true
                }
              ]
            }
          ],
          "priority": 7
        },
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.5
        }
      },
      "become_villager_v2": {
        "minecraft:transformation": {
          "into": "minecraft:villager_v2",
          "keep_level": true
        }
      },
      "weaponsmith": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.weapon",
          "table": "trading/weapon_smith_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "blacksmith",
            "weaponsmith",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 3
        }
      },
      "butcher": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.butcher",
          "table": "trading/butcher_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "artisan",
            "butcher",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 4
        }
      },
      "behavior_peasant": {
        "minecraft:behavior.harvest_farm_block": {
          "priority": 9,
          "speed_multiplier": 0.5
        },
        "minecraft:shareables": {
          "items": [
            {
              "item": "minecraft:bread",
              "stored_in_inventory": true,
              "surplus_amount": 6,
              "want_amount": 3
            },
            {
              "item": "minecraft:carrot",
              "stored_in_inventory": true,
              "surplus_amount": 4,
              "want_amount": 60
            },
            {
              "item": "minecraft:potato",
              "stored_in_inventory": true,
              "surplus_amount": 24,
              "want_amount": 60
            },
            {
              "item": "minecraft:beetroot",
              "stored_in_inventory": true,
              "surplus_amount": 24,
              "want_amount": 60
            },
            {
              "item": "minecraft:wheat_seeds",
              "stored_in_inventory": true,
              "surplus_amount": 64,
              "want_amount": 64
            },
            {
              "item": "minecraft:beetroot_seeds",
              "stored_in_inventory": true,
              "surplus_amount": 64,
              "want_amount": 64
            },
            {
              "craft_into": "minecraft:bread",
              "want_amount": 45,
              "item": "minecraft:wheat",
              "stored_in_inventory": true,
              "surplus_amount": 18
            }
          ]
        }
      },
      "behavior_non_peasant": {
        "minecraft:shareables": {
          "items": [
            {
              "item": "minecraft:bread",
              "stored_in_inventory": true,
              "surplus_amount": 6,
              "want_amount": 3
            },
            {
              "item": "minecraft:carrot",
              "stored_in_inventory": true,
              "surplus_amount": 24,
              "want_amount": 12
            },
            {
              "item": "minecraft:potato",
              "stored_in_inventory": true,
              "surplus_amount": 24,
              "want_amount": 12
            },
            {
              "item": "minecraft:beetroot",
              "stored_in_inventory": true,
              "surplus_amount": 24,
              "want_amount": 12
            }
          ]
        }
      },
      "become_witch": {
        "minecraft:transformation": {
          "delay": 0.5,
          "into": "minecraft:witch"
        }
      },
      "cartographer": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.cartographer",
          "table": "trading/cartographer_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "cartographer",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "cleric": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.cleric",
          "table": "trading/cleric_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "priest",
            "cleric",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 2
        }
      },
      "farmer": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.farmer",
          "table": "trading/farmer_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "peasant",
            "farmer",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "fisherman": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.fisherman",
          "table": "trading/fisherman_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "peasant",
            "fisherman",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "fletcher": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.fletcher",
          "table": "trading/fletcher_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "peasant",
            "fletcher",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "leatherworker": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.leather",
          "table": "trading/leather_worker_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "artisan",
            "leatherworker",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 4
        }
      },
      "librarian": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.librarian",
          "table": "trading/librarian_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "librarian",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:celebrate": {
        "minecraft:behavior.celebrate_survive": {
          "duration": 30,
          "fireworks_interval": {
            "range_max": 7,
            "range_min": 2
          },
          "on_celebration_end_event": {
            "event": "minecraft:stop_celebrating",
            "target": "self"
          },
          "priority": 5
        },
        "minecraft:behavior.move_outdoors": {
          "priority": 2,
          "speed_multiplier": 0.8,
          "timeout_cooldown": 8
        }
      },
      "shepherd": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.shepherd",
          "table": "trading/shepherd_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "peasant",
            "shepherd",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "toolsmith": {
        "minecraft:trade_table": {
          "convert_trades_economy": true,
          "display_name": "entity.villager.tool",
          "table": "trading/tool_smith_trades.json"
        },
        "minecraft:type_family": {
          "family": [
            "villager",
            "blacksmith",
            "toolsmith",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 3
        }
      }
    },
    "events": {
      "become_witch": {
        "add": {
          "component_groups": [
            "become_witch"
          ]
        }
      },
      "minecraft:entity_transformed": {
        "sequence": [
          // Transform baby zombie to baby villager
          {
            "filters": {
              "subject": "other",
              "test": "has_component",
              "value": "minecraft:is_baby"
            },
            "add": {
              "component_groups": [
                "baby"
              ]
            }
          },
          // Transform adult zombie to adult villager
          {
            "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",
                "behavior_peasant"
              ]
            }
          },
          // Transform fisherman zombie to fisherman villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "fisherman"
            },
            "add": {
              "component_groups": [
                "fisherman",
                "behavior_peasant"
              ]
            }
          },
          // Transform shepherd zombie to shepherd villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "shepherd"
            },
            "add": {
              "component_groups": [
                "shepherd",
                "behavior_peasant"
              ]
            }
          },
          // Transform fletcher zombie to fletcher villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "fletcher"
            },
            "add": {
              "component_groups": [
                "fletcher",
                "behavior_peasant"
              ]
            }
          },
          // Transform librarian zombie to librarian villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "librarian"
            },
            "add": {
              "component_groups": [
                "librarian",
                "behavior_non_peasant"
              ]
            }
          },
          // Transform cartographer zombie to cartographer villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "cartographer"
            },
            "add": {
              "component_groups": [
                "cartographer",
                "behavior_non_peasant"
              ]
            }
          },
          // Transform cleric zombie to cleric villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "cleric"
            },
            "add": {
              "component_groups": [
                "cleric",
                "behavior_non_peasant"
              ]
            }
          },
          // Transform armorer zombie to armorer villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "armorer"
            },
            "add": {
              "component_groups": [
                "armorer",
                "behavior_non_peasant"
              ]
            }
          },
          // Transform weaponsmith zombie to weaponsmith villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "weaponsmith"
            },
            "add": {
              "component_groups": [
                "weaponsmith",
                "behavior_non_peasant"
              ]
            }
          },
          // Transform toolsmith zombie to toolsmith villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "toolsmith"
            },
            "add": {
              "component_groups": [
                "toolsmith",
                "behavior_non_peasant"
              ]
            }
          },
          // Transform butcher zombie to butcher villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "butcher"
            },
            "add": {
              "component_groups": [
                "butcher",
                "behavior_non_peasant"
              ]
            }
          },
          // Transform leatherworker zombie to leatherworker villager
          {
            "filters": {
              "subject": "other",
              "test": "is_family",
              "value": "leatherworker"
            },
            "add": {
              "component_groups": [
                "leatherworker",
                "behavior_non_peasant"
              ]
            }
          }
        ]
      },
      "become_zombie": {
        "sequence": [
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "become_zombie"
                  ]
                },
                "weight": 50
              },
              {
                "weight": 50
              }
            ],
            "filters": {
              "test": "is_difficulty",
              "value": "normal"
            }
          },
          {
            "filters": {
              "test": "is_difficulty",
              "value": "hard"
            },
            "add": {
              "component_groups": [
                "become_zombie"
              ]
            }
          }
        ]
      },
      "minecraft:ageable_grow_up": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "adult"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            }
          }
        ]
      },
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "baby"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "adult"
                  ]
                },
                "weight": 95
              }
            ],
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "value": "minecraft:variant"
            }
          },
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "farmer",
                    "behavior_peasant"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "fisherman",
                    "behavior_peasant"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "shepherd",
                    "behavior_peasant"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "fletcher",
                    "behavior_peasant"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "librarian",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "cartographer",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "cleric",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "armorer",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "weaponsmith",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "toolsmith",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "butcher",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 10
              },
              {
                "add": {
                  "component_groups": [
                    "leatherworker",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 10
              }
            ],
            "filters": {
              "test": "has_component",
              "operator": "!=",
              "value": "minecraft:variant"
            }
          }
        ]
      },
      "minecraft:become_cleric": {
        "add": {
          "component_groups": [
            "cleric",
            "adult",
            "behavior_non_peasant"
          ]
        },
        "remove": {
          "component_groups": [
            "baby"
          ]
        }
      },
      "minecraft:entity_born": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "baby"
              ]
            }
          },
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "farmer",
                    "behavior_peasant"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "fisherman",
                    "behavior_peasant"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "shepherd",
                    "behavior_peasant"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "fletcher",
                    "behavior_peasant"
                  ]
                },
                "weight": 5
              },
              {
                "add": {
                  "component_groups": [
                    "librarian",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "cartographer",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "cleric",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 20
              },
              {
                "add": {
                  "component_groups": [
                    "armorer",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "weaponsmith",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "toolsmith",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 6
              },
              {
                "add": {
                  "component_groups": [
                    "butcher",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 10
              },
              {
                "add": {
                  "component_groups": [
                    "leatherworker",
                    "behavior_non_peasant"
                  ]
                },
                "weight": 10
              }
            ]
          }
        ]
      },
      "minecraft:spawn_cleric": {
        "add": {
          "component_groups": [
            "cleric",
            "adult",
            "behavior_non_peasant"
          ]
        },
        "remove": {
          "component_groups": [
            "baby"
          ]
        }
      },
      "minecraft:spawn_armorer": {
        "randomize": [
          {
            "add": {
              "component_groups": [
                "armorer",
                "adult",
                "behavior_non_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 6
          },
          {
            "add": {
              "component_groups": [
                "weaponsmith",
                "adult",
                "behavior_non_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 6
          },
          {
            "add": {
              "component_groups": [
                "toolsmith",
                "adult",
                "behavior_non_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 6
          }
        ]
      },
      "minecraft:spawn_butcher": {
        "randomize": [
          {
            "add": {
              "component_groups": [
                "butcher",
                "adult",
                "behavior_non_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 10
          },
          {
            "add": {
              "component_groups": [
                "leatherworker",
                "adult",
                "behavior_non_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 10
          }
        ]
      },
      "minecraft:spawn_farmer": {
        "randomize": [
          {
            "add": {
              "component_groups": [
                "farmer",
                "adult",
                "behavior_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 5
          },
          {
            "add": {
              "component_groups": [
                "fisherman",
                "adult",
                "behavior_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 5
          },
          {
            "add": {
              "component_groups": [
                "shepherd",
                "adult",
                "behavior_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 5
          },
          {
            "add": {
              "component_groups": [
                "fletcher",
                "adult",
                "behavior_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 5
          }
        ]
      },
      "minecraft:spawn_librarian": {
        "randomize": [
          {
            "add": {
              "component_groups": [
                "librarian",
                "adult",
                "behavior_non_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 20
          },
          {
            "add": {
              "component_groups": [
                "cartographer",
                "behavior_non_peasant"
              ]
            },
            "remove": {
              "component_groups": [
                "baby"
              ]
            },
            "weight": 20
          }
        ]
      },
      "minecraft:start_celebrating": { // Event must be called exactly this for village to fire it when a raid is won
        "add": {
          "component_groups": [
            "minecraft:celebrate"
          ]
        }
      },
      "minecraft:stop_celebrating": {
        "remove": {
          "component_groups": [
            "minecraft:celebrate"
          ]
        }
      }
    }
  }
}