{
  "format_version": "1.8.0",
  "minecraft:entity": {
    "description": {
      "identifier": "bbr:baldi",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "events": {
      "apple": {
        "run_command": {
          "command": [
            "playanimation @e animation.bbr_baldi.apple",
            "effect @e [type=bbr:baldi] slowness 10 99"
          ]
        }
      },
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "minecraft:default_targeting"
          ]
        }
      },
      "minecraft:spawn_as_patrol_follower": {
        "add": {
          "component_groups": [
            "minecraft:default_targeting",
            "minecraft:patrol_follower"
          ]
        }
      },
      "minecraft:become_aggro": {
        "add": {
          "component_groups": [
            "minecraft:vindicator_aggro"
          ]
        }
      },
      "minecraft:stop_aggro": {
        "remove": {
          "component_groups": [
            "minecraft:vindicator_aggro"
          ]
        }
      },
      "minecraft:start_johnny": {
        "add": {
          "component_groups": [
            "minecraft:vindicator_johnny"
          ]
        }
      },
      "minecraft:stop_johnny": {
        "remove": {
          "component_groups": [
            "minecraft:vindicator_johnny"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:default_targeting"
          ]
        }
      },
      "minecraft:spawn_for_raid": {
        "add": {
          "component_groups": [
            "minecraft:default_targeting",
            "minecraft:raid_configuration"
          ]
        }
      },
      "minecraft:spawn_as_illager_captain": {
        "add": {
          "component_groups": [
            "minecraft:illager_squad_captain"
          ]
        }
      },
      "minecraft:promote_to_illager_captain": {
        "add": {
          "component_groups": [
            "minecraft:illager_squad_captain"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:patrol_follower"
          ]
        }
      },
      "minecraft:promote_to_patrol_captain": {
        "add": {
          "component_groups": [
            "minecraft:patrol_captain"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:patrol_follower"
          ]
        }
      },
      "on:death": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt_by_player": {
        "run_command": {
          "command": []
        }
      },
      "on:ignite": {
        "run_command": {
          "command": []
        }
      },
      "on:target_acquired": {
        "run_command": {
          "command": []
        }
      },
      "on:target_escape": {
        "run_command": {
          "command": []
        }
      },
      "on:wake_with_owner": {
        "run_command": {
          "command": []
        }
      }
    },
    "component_groups": {
      "minecraft:vindicator_aggro": {
        "minecraft:angry": {
          "duration": -1,
          "broadcastAnger": false,
          "calm_event": {
            "event": "minecraft:stop_aggro",
            "target": "self"
          }
        }
      },
      "minecraft:vindicator_johnny": {
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 3,
          "within_radius": 25,
          "must_reach": false,
          "entity_types": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "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"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "villager"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "peasant"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "farmer"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "fisherman"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "shepherd"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "fletcher"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "librarian"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "cartographer"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "priest"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "cleric"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "blacksmith"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "armorer"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "weaponsmith"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "toolsmith"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "artisan"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "butcher"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "leatherworker"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "vindicator"
                  }
                ]
              },
              "max_dist": 35.0,
              "must_see": false
            }
          ],
          "must_see": false,
          "speed_multiplier": 1
        }
      },
      "minecraft:default_targeting": {
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 3,
          "within_radius": 25,
          "must_reach": false,
          "entity_types": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "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"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "villager"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "peasant"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "farmer"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "fisherman"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "shepherd"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "fletcher"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "librarian"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "cartographer"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "priest"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "cleric"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "blacksmith"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "armorer"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "weaponsmith"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "toolsmith"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "artisan"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "butcher"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "leatherworker"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "vindicator"
                  }
                ]
              },
              "max_dist": 35.0,
              "must_see": false
            }
          ],
          "must_see": false,
          "speed_multiplier": 1
        }
      },
      "minecraft:raid_configuration": {
        "minecraft:dweller": {
          "dwelling_type": "village",
          "dweller_role": "hostile",
          "update_interval_base": 60,
          "update_interval_variant": 40,
          "can_find_poi": false,
          "can_migrate": false,
          "first_founding_reward": 0
        },
        "minecraft:behavior.move_to_village": {
          "priority": 4,
          "speed_multiplier": 1
        },
        "minecraft:loot": {
          "table": "loot_tables/entities/vindicator_raid.json"
        },
        "minecraft:navigation.walk": {
          "can_path_over_water": true,
          "can_pass_doors": true,
          "can_break_doors": true
        },
        "minecraft:annotation.break_door": {
          "break_time": 30,
          "min_difficulty": "normal"
        },
        "minecraft:ambient_sound_interval": {
          "value": 2,
          "range": 4,
          "event_name": "ambient.in.raid"
        }
      },
      "minecraft:illager_squad_captain": {
        "minecraft:is_illager_captain": {},
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:equipment": {
          "table": "loot_tables/entities/vindicator_captain_equipment.json",
          "slot_drop_chance": [
            {
              "slot": "slot.armor.chest",
              "drop_chance": 1
            }
          ]
        },
        "minecraft:damage_sensor": {
          "on_damage": {
            "filters": {
              "all_of": [
                {
                  "test": "has_damage",
                  "value": "fatal"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "player"
                }
              ]
            },
            "event": "minecraft:gain_bad_omen",
            "target": "other"
          }
        }
      },
      "minecraft:patrol_captain": {
        "minecraft:is_illager_captain": {},
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:equipment": {
          "table": "loot_tables/entities/vindicator_captain_equipment.json",
          "slot_drop_chance": [
            {
              "slot": "slot.armor.chest",
              "drop_chance": 1
            }
          ]
        },
        "minecraft:damage_sensor": {
          "on_damage": {
            "filters": {
              "all_of": [
                {
                  "test": "has_damage",
                  "value": "fatal"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "player"
                }
              ]
            },
            "event": "minecraft:gain_bad_omen",
            "target": "other"
          }
        },
        "minecraft:behavior.move_to_random_block": {
          "priority": 5,
          "speed_multiplier": 0.55,
          "within_radius": 8,
          "block_distance": 512
        }
      },
      "minecraft:patrol_follower": {
        "minecraft:behavior.follow_target_captain": {
          "priority": 5,
          "speed_multiplier": 0.8,
          "within_radius": 64,
          "follow_distance": 5
        }
      }
    },
    "components": {
      "minecraft:nameable": {
        "default_trigger": {
          "event": "minecraft:stop_johnny",
          "target": "self"
        },
        "name_actions": [
          {
            "name_filter": "Johnny",
            "on_named": {
              "event": "minecraft:start_johnny",
              "target": "self"
            }
          }
        ],
        "alwaysShow": false,
        "allowNameTagRenaming": false
      },
      "minecraft:type_family": {
        "family": []
      },
      "minecraft:variant": {
        "value": 0
      },
      "minecraft:breathable": {
        "totalSupply": 15,
        "suffocateTime": 0
      },
      "minecraft:collision_box": {
        "height": 1.8,
        "width": 0.6
      },
      "minecraft:health": {
        "value": 24,
        "max": 24
      },
      "minecraft:interact": [
        {
          "interact_text": "Give The Apple",
          "on_interact": {
            "event": "apple",
            "filters": {
              "all_of": [
                {
                  "domain": "hand",
                  "subject": "other",
                  "test": "has_equipment",
                  "value": "bbr:appleforbaldi"
                }
              ]
            }
          },
          "use_item": true
        }
      ],
      "minecraft:jump.static": {},
      "minecraft:loot": {
        "table": "loot_tables/entities/vindicatir.json"
      },
      "minecraft:attack": {
        "damage": 8
      },
      "minecraft:movement": {
        "value": 0.35
      },
      "minecraft:navigation.walk": {
        "can_path_over_water": true
      },
      "minecraft:movement.basic": {},
      "minecraft:follow_range": {
        "value": 64
      },
      "minecraft:equipment": {
        "table": "loot_tables/entities/vindica.json"
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.melee_attack": {
        "priority": 3,
        "speed_multiplier": 1,
        "track_target": false
      },
      "minecraft:behavior.random_stroll": {
        "priority": 9,
        "speed_multiplier": 1
      },
      "minecraft:behavior.look_at_player": {
        "priority": 10,
        "look_distance": 8,
        "probability": 0.02
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 3
      },
      "minecraft:physics": {},
      "minecraft:annotation.open_door": {},
      "minecraft:behavior.open_door": {
        "on_death": "query.last_hit_by_player ? 10 : 0",
        "close_door_after": true
      },
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 10 : 0"
      },
      "minecraft:underwater_movement": {
        "value": 0.02
      },
      "minecraft:scale": {
        "value": 0.6
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 3,
        "within_radius": 25,
        "must_reach": false,
        "entity_types": [
          {
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "player"
                },
                {
                  "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"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "villager"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "peasant"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "farmer"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "fisherman"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "shepherd"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "fletcher"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "librarian"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "cartographer"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "priest"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "cleric"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "blacksmith"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "armorer"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "weaponsmith"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "toolsmith"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "artisan"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "butcher"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "leatherworker"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "vindicator"
                }
              ]
            },
            "max_dist": 35.0,
            "must_see": false
          }
        ],
        "must_see": false,
        "speed_multiplier": 1
      },
      "minecraft:behavior.owner_hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.owner_hurt_target": {
        "priority": 2
      },
      "minecraft:equip_item": {}
    }
  }
}