{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "hoh_bht:boss_pillager",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "minecraft:ranged_attack": {
        "minecraft:behavior.ranged_attack": {
          "priority": 4,
          "attack_interval_min": 1.0,
          "attack_interval_max": 1.0,
          "attack_radius": 8.0
        },
        "minecraft:shooter": {
          "def": "minecraft:arrow"
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "filters": {
              "test": "is_underwater",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "event": "minecraft:melee_mode"
          }
        }
      },
      "minecraft:melee_attack": {
        "minecraft:behavior.melee_attack": {
          "priority": 4,
          "track_target": true
        },
        "minecraft:attack": {
          "damage": 3
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "filters": {
              "test": "in_water",
              "subject": "self",
              "operator": "==",
              "value": false
            },
            "event": "minecraft:ranged_mode"
          }
        }
      }
    },
    "components": {
      "minecraft:boss": {
        "hud_range": 64,
        "name": "entity.hoh_bht:boss_pillager.name",
        "should_darken_sky": false
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? (query.is_baby ? 12 : 5) + (Math.die_roll(query.equipment_count,1,3)) : 0"
      },
      "minecraft:equip_item": {},
      "minecraft:collision_box": {
        "width": 0.6,
        "height": 1.9
      },
      "minecraft:type_family": {
        "family": [
          "pillager",
          "monster",
          "illager",
          "mob"
        ]
      },
      "minecraft:variant": {
        "value": 0
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0
      },
      "minecraft:health": {
        "value": 24,
        "max": 24
      },
      "minecraft:conditional_bandwidth_optimization": {},
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/pillager.json"
      },
      "minecraft:shareables": {
        "items": [
          {
            "item": "minecraft:banner:15",
            "want_amount": 1,
            "surplus_amount": 1,
            "priority": 0
          }
        ]
      },
      "minecraft:movement": {
        "value": 0.35
      },
      "minecraft:persistent": {},
      "minecraft:navigation.walk": {
        "can_path_over_water": true
      },
      "minecraft:movement.basic": {},
      "minecraft:jump.static": {},
      "minecraft:nameable": {},
      "minecraft:equipment": {
        "table": "loot_tables/entities/pillager_gear.json"
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1,
        "entity_types": {
          "filters": {
            "test": "is_family",
            "subject": "other",
            "operator": "!=",
            "value": "illager"
          },
          "max_dist": 64
        }
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 2,
        "must_see": true,
        "reselect_targets": true,
        "entity_types": [
          {
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "player"
                }
              ]
            },
            "max_dist": 64
          }
        ]
      },
      "minecraft:behavior.equip_item": {
        "priority": 3
      },
      "minecraft:behavior.pickup_items": {
        "priority": 7,
        "max_dist": 3,
        "goal_radius": 2,
        "speed_multiplier": 1.0
      },
      "minecraft:behavior.random_stroll": {
        "priority": 8,
        "speed_multiplier": 1
      },
      "minecraft:behavior.look_at_player": {
        "priority": 9,
        "look_distance": 8
      },
      "minecraft:behavior.random_look_around": {
        "priority": 10
      },
      "minecraft:behavior.charge_held_item": {
        "priority": 3,
        "items": [
          "minecraft:arrow"
        ]
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:follow_range": {
        "value": 64
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "minecraft:ranged_attack"
          ]
        }
      },
      "minecraft:melee_mode": {
        "remove": {
          "component_groups": [
            "minecraft:ranged_attack"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:melee_attack"
          ]
        }
      },
      "minecraft:ranged_mode": {
        "remove": {
          "component_groups": [
            "minecraft:melee_attack"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:ranged_attack"
          ]
        }
      }
    }
  }
}