{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "legacy:beekeeper_villager",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "managed": {
        "minecraft:managed_wandering_trader": {}
      },
      "despawning": {
        "minecraft:type_family": {
          "family": [
            "villager",
            "beekeeper_despawning",
            "mob"
          ]
        }
      },
      "minecraft:beekeeper_work": {
        "minecraft:behavior.move_to_block": {
          "priority": 5,
          "tick_interval": 35,
          "start_chance": 0.5,
          "search_range": 256,
          "search_height": 8,
          "goal_radius": 1,
          "stay_duration": 12,
          "target_offset": [
            0,
            0.25,
            0
          ],
          "target_blocks": [
            "beehive"
          ],
          "on_stay_completed": {
            "event": "minecraft:resupply_trades"
          },
          "target_selection_method": "nearest",
          "speed_multiplier": 0.7
        },
        "minecraft:behavior.random_stroll": {
          "priority": 6,
          "speed_multiplier": 0.6
        },
        "minecraft:behavior.explore_outskirts": {
          "priority": 9,
          "explore_dist": 7,
          "speed_multiplier": 0.8
        },
        "minecraft:behavior.move_to_village": {
          "priority": 8,
          "speed_multiplier": 0.7
        },
        "minecraft:behavior.move_through_village": {
          "priority": 7,
          "speed_multiplier": 0.7,
          "only_at_night": true
        }
      },
      "explore_schedule_villager": {
        "minecraft:behavior.random_stroll": {
          "priority": 6,
          "speed_multiplier": 0.8
        },
        "minecraft:behavior.explore_outskirts": {
          "priority": 9,
          "explore_dist": 7,
          "speed_multiplier": 0.8
        },
        "minecraft:behavior.move_to_village": {
          "priority": 8,
          "speed_multiplier": 0.7
        },
        "minecraft:behavior.move_through_village": {
          "priority": 7,
          "speed_multiplier": 1,
          "only_at_night": true
        }
      },
      "gather_schedule_villager": {
        "minecraft:behavior.mingle": {
          "priority": 3,
          "speed_multiplier": 1.2,
          "duration": 30,
          "cooldown_time": 10,
          "mingle_partner_type": "legacy:beekeeper_villager",
          "mingle_distance": 2
        }
      },
      "beekeeper_schedule": {
        "minecraft:scheduler": {
          "min_delay_secs": 0,
          "max_delay_secs": 1,
          "scheduled_events": [
            {
              "filters": {
                "all_of": [
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003e\u003d",
                    "value": 0
                  },
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003c",
                    "value": 2000
                  }
                ]
              },
              "event": "minecraft:schedule_work_time"
            },
            {
              "filters": {
                "all_of": [
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003e\u003d",
                    "value": 2000
                  },
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003c",
                    "value": 4000
                  }
                ]
              },
              "event": "minecraft:schedule_gather_villager"
            },
            {
              "filters": {
                "all_of": [
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003e\u003d",
                    "value": 4000
                  },
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003c",
                    "value": 10000
                  }
                ]
              },
              "event": "minecraft:schedule_work"
            },
            {
              "filters": {
                "all_of": [
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003e\u003d",
                    "value": 8000
                  },
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003c",
                    "value": 10000
                  }
                ]
              },
              "event": "minecraft:schedule_gather_villager"
            },
            {
              "filters": {
                "all_of": [
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003e\u003d",
                    "value": 11800
                  },
                  {
                    "test": "hourly_clock_time",
                    "operator": "\u003c",
                    "value": 24000
                  }
                ]
              },
              "event": "minecraft:schedule_explore_village"
            }
          ]
        }
      },
      "trade_resupply_component_group": {
        "minecraft:trade_resupply": {},
        "minecraft:timer": {
          "time": 2,
          "looping": true,
          "time_down_event": {
            "event": "minecraft:stop_resupply"
          }
        }
      },
      "beekeeper_color_0": {
        "minecraft:skin_id": {
          "value": 0
        }
      },
      "beekeeper_color_1": {
        "minecraft:skin_id": {
          "value": 1
        }
      },
      "beekeeper_color_2": {
        "minecraft:skin_id": {
          "value": 2
        }
      },
      "beekeeper_color_3": {
        "minecraft:skin_id": {
          "value": 3
        }
      },
      "regeneration": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 2,
              "visible": 1,
              "ambient": false,
              "duration": 30
            }
          ]
        }
      },
      "blessed_regeneration": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 35
            }
          ]
        }
      },
      "blessed_regeneration_cured": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 25
            }
          ],
          "remove_effects": "weakness"
        }
      },
      "blessed_regeneration_cured_1": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 25
            }
          ],
          "remove_effects": "poison"
        }
      },
      "blessed_regeneration_cured_2": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 25
            }
          ],
          "remove_effects": "wither"
        }
      },
      "blessed_regeneration_cured_3": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 25
            }
          ],
          "remove_effects": "slowness"
        }
      },
      "minecraft:scared": {
        "minecraft:angry": {
          "duration": 5,
          "broadcastAnger": true,
          "broadcastRange": 10,
          "broadcast_targets": [
            "bee"
          ],
          "broadcast_filters": {
            "test": "is_leashed_to",
            "subject": "other",
            "value": true
          },
          "calm_event": {
            "event": "minecraft:become_calm",
            "target": "self"
          }
        }
      }
    },
    "components": {
      "minecraft:type_family": {
        "family": [
          "wandering_trader",
          "villager",
          "mob"
        ]
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:timer": {
        "looping": false,
        "random_time_choices": [
          {
            "weight": 50,
            "value": 2400
          },
          {
            "weight": 50,
            "value": 3600
          }
        ],
        "time_down_event": {
          "event": "minecraft:start_despawn",
          "target": "self"
        }
      },
      "minecraft:spawn_entity": {
        "entities": [
          {
            "min_wait_time": 0,
            "max_wait_time": 0,
            "spawn_entity": "minecraft:bee",
            "spawn_event": "minecraft:entity_spawned",
            "single_use": true,
            "num_to_spawn": 2,
            "should_leash": true
          }
        ]
      },
      "minecraft:economy_trade_table": {
        "display_name": "entity.legacy:beekeeper_villager.name",
        "table": "trading/economy_trades/beekeeper_trades.json",
        "new_screen": true
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0
      },
      "minecraft:health": {
        "value": 20,
        "max": 20
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "\u003d\u003d",
              "value": true
            },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "minecraft:collision_box": {
        "width": 0.6,
        "height": 1.9
      },
      "minecraft:movement": {
        "value": 0.5
      },
      "minecraft:navigation.walk": {
        "can_path_over_water": true,
        "can_pass_doors": true,
        "can_open_doors": true,
        "avoid_water": true
      },
      "minecraft:behavior.pickup_items": {
        "priority": 4,
        "max_dist": 3,
        "goal_radius": 2,
        "speed_multiplier": 0.5,
        "can_pickup_to_hand_or_equipment": false
      },
      "minecraft:shareables": {
        "items": [
          {
            "item": "minecraft:bread",
            "want_amount": 3,
            "surplus_amount": 6,
            "stored_in_inventory": true
          },
          {
            "item": "minecraft:honey_bottle",
            "want_amount": 1,
            "surplus_amount": 6,
            "stored_in_inventory": true
          },
          {
            "item": "minecraft:honeycomb",
            "want_amount": 64,
            "surplus_amount": 64,
            "stored_in_inventory": true
          }
        ]
      },
      "minecraft:annotation.open_door": {},
      "minecraft:movement.basic": {},
      "minecraft:jump.static": {},
      "minecraft:can_climb": {},
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "entity_attack",
            "deals_damage": true,
            "on_damage": {
              "event": "minecraft:become_scared"
            }
          },
          {
            "cause": "projectile",
            "deals_damage": true,
            "on_damage": {
              "event": "minecraft:become_scared"
            }
          },
          {
            "cause": "magic",
            "deals_damage": true,
            "on_damage": {
              "event": "minecraft:become_scared"
            }
          }
        ]
      },
      "minecraft:despawn": {
        "remove_child_entities": true,
        "filters": {
          "all_of": [
            {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "self",
                  "value": "wandering_trader_despawning"
                },
                {
                  "test": "has_trade_supply",
                  "subject": "self",
                  "value": false
                }
              ]
            },
            {
              "test": "distance_to_nearest_player",
              "operator": "\u003e",
              "value": 24
            }
          ]
        }
      },
      "minecraft:behavior.trade_with_player": {
        "priority": 1
      },
      "minecraft:behavior.trade_interest": {
        "priority": 3,
        "within_radius": 6.0,
        "interest_time": 45.0,
        "remove_item_time": 1.0,
        "carried_item_switch_time": 2.0,
        "cooldown": 2.0
      },
      "minecraft:behavior.look_at_trading_player": {
        "priority": 4
      },
      "minecraft:behavior.panic": {
        "priority": 1,
        "speed_multiplier": 0.6
      },
      "minecraft:behavior.avoid_mob_type": {
        "priority": 2,
        "entity_types": [
          {
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "zombie"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "zombie_villager"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "zombie_pigman"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "illager"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "vex"
                }
              ]
            },
            "walk_speed_multiplier": 0.6,
            "sprint_speed_multiplier": 0.6
          }
        ],
        "max_dist": 6
      },
      "minecraft:behavior.restrict_open_door": {
        "priority": 5
      },
      "minecraft:behavior.open_door": {
        "priority": 6,
        "close_door_after": true
      },
      "minecraft:behavior.move_towards_restriction": {
        "priority": 7,
        "speed_multiplier": 0.6
      },
      "minecraft:behavior.look_at_player": {
        "priority": 8,
        "look_distance": 8,
        "probability": 0.02
      },
      "minecraft:behavior.random_stroll": {
        "priority": 10,
        "speed_multiplier": 0.6
      },
      "minecraft:behavior.random_look_around": {
        "priority": 9
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      }
    },
    "events": {
      "minecraft:scheduled": {
        "add": {
          "component_groups": [
            "managed"
          ]
        }
      },
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "beekeeper_schedule"
              ]
            }
          },
          {
            "randomize": [
              {
                "weight": 5,
                "add": {
                  "component_groups": [
                    "beekeeper_color_0"
                  ]
                }
              },
              {
                "weight": 5,
                "add": {
                  "component_groups": [
                    "beekeeper_color_1"
                  ]
                }
              },
              {
                "weight": 5,
                "add": {
                  "component_groups": [
                    "beekeeper_color_2"
                  ]
                }
              },
              {
                "weight": 5,
                "add": {
                  "component_groups": [
                    "beekeeper_color_3"
                  ]
                }
              }
            ]
          }
        ]
      },
      "minecraft:start_despawn": {
        "add": {
          "component_groups": [
            "despawning"
          ]
        }
      },
      "minecraft:become_scared": {
        "add": {
          "component_groups": [
            "minecraft:scared"
          ]
        }
      },
      "minecraft:become_calm": {
        "remove": {
          "component_groups": [
            "minecraft:scared"
          ]
        }
      },
      "minecraft:schedule_explore_village": {
        "add": {
          "component_groups": [
            "explore_schedule_villager",
            "trade_resupply_component_group"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:beekeeper_work",
            "gather_schedule_villager"
          ]
        }
      },
      "minecraft:schedule_work_time": {
        "remove": {
          "component_groups": [
            "bed_schedule_villager",
            "gather_schedule_villager"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:beekeeper_work"
          ]
        }
      },
      "minecraft:schedule_gather_villager": {
        "remove": {
          "component_groups": [
            "bed_schedule_villager",
            "minecraft:beekeeper_work"
          ]
        },
        "add": {
          "component_groups": [
            "gather_schedule_villager"
          ]
        }
      },
      "minecraft:schedule_work": {
        "remove": {
          "component_groups": [
            "bed_schedule_villager",
            "gather_schedule_villager"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:beekeeper_work"
          ]
        }
      },
      "minecraft:give_regeneration_villager": {
        "add": {
          "component_groups": [
            "regeneration"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager": {
        "add": {
          "component_groups": [
            "blessed_regeneration"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager_cured": {
        "add": {
          "component_groups": [
            "blessed_regeneration_cured"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager_cured_1": {
        "add": {
          "component_groups": [
            "blessed_regeneration_cured_1"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager_cured_2": {
        "add": {
          "component_groups": [
            "blessed_regeneration_cured_2"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager_cured_3": {
        "add": {
          "component_groups": [
            "blessed_regeneration_cured_3"
          ]
        }
      },
      "minecraft:resupply_trades": {
        "randomize": [
          {
            "weight": 1,
            "add": {
              "component_groups": [
                "trade_resupply_component_group"
              ]
            },
            "run_command": {
              "command": [
                "playsound block.beehive.shear @r ~~~"
              ]
            }
          },
          {
            "weight": 11,
            "run_command": {
              "command": [
                "playsound block.beehive.shear @r ~~~"
              ]
            }
          }
        ]
      }
    }
  }
}