{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "legacy:villager_vex",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "runtime_identifier": "minecraft:vex"
    },
    "components": {
      "minecraft:is_hidden_when_invisible": {
      },
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0"
      },
      "minecraft:nameable": {
      },
      "minecraft:type_family": {
        "family": [ "iron_golem", "villager", "mob" ]
      },
      "minecraft:equipment": {
        "table": "loot_tables/entities/vex_gear.json"
      },
      "minecraft:health": {
        "value": 14,
        "max": 14
      },
      "minecraft:attack": {
        "damage": 3
      },
      "minecraft:collision_box": {
        "width": 0.4,
        "height": 0.8
      },
      "minecraft:movement": {
        "value": 1.0
      },
      "minecraft:navigation.walk": {
        "can_path_over_water": true
      },
      "minecraft:movement.basic": {

      },
      "minecraft:jump.static": {
      },
      "minecraft:can_climb": {
      },
      "minecraft:fire_immune": {
      },
      "minecraft:despawn": {
        "despawn_from_distance": {}
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.charge_attack": {
        "priority": 4
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "on_damage": {
              "filters": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "villager"
                }
              ]
            },
            "deals_damage": false
          }
        ]
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1,
        "entity_types": {
          "filters": {
            "test": "is_family",
            "subject": "other",
            "operator": "!\u003d",
            "value": "villager"
          },
          "max_dist": 64
        }
      },
      "minecraft:angry": {
        "duration": 30,
        "broadcast_anger": true,
        "broadcast_anger_on_attack": true,
        "broadcast_anger_on_being_attacked": true,
        "broadcast_range": 16,
        "broadcast_targets": [
			"villager"
        ]
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 3,
        "entity_types": [
          {
            "filters": {
              "any_of" : [
                {"test" : "is_family", "subject" : "other", "value" :  "illager"},
                {"test" : "is_family", "subject" : "other", "value" :  "monster"},
                {"test" : "is_family", "subject" : "other", "value" :  "undead"}
              ]
            },
            "max_dist": 70
          },
          {
            "filters": {
              "all_of": [
                { "test": "is_family", "subject": "other", "value": "illager" },
                { "test": "has_component", "subject": "other", "operator": "!=", "value": "minecraft:is_baby" }
              ]
            },
            "max_dist": 70
          }
        ],
        "must_see": true
      },
      "minecraft:behavior.look_at_player": {
        "priority": 9,
        "look_distance": 6.0,
        "probability": 0.02
      },
      "minecraft:behavior.look_at_entity": {
        "priority": 9,
        "look_distance": 6.0,
        "probability": 0.02,
        "filters": { "test" :  "is_family", "subject" : "other", "value" :  "mob"}
      },
      "minecraft:physics": {
        "has_gravity": false,
        "has_collision": false
      },
      "minecraft:conditional_bandwidth_optimization": {
      }
    }
  }
}