{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:stray",
      "is_experimental": false,
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "monster"
    },
    "components": {
      "minecraft:behavior.avoid_mob_type": {
        "entity_types": [
          {
            "filters": {
              "AND": [
                {
                  "test": "is_family",
                  "subject": 1,
                  "operator": 0,
                  "value": "wolf"
                }
              ]
            },
            "max_dist": 6,
            "walk_speed_multiplier": 1.2,
            "sprint_speed_multiplier": 1.2
          }
        ],
        "priority": 4
      },
      "minecraft:behavior.flee_sun": {
        "priority": 2,
        "speed_multiplier": 1
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.look_at_player": {
        "look_time": {
          "min": 1,
          "max": 2
        },
        "priority": 6
      },
      "minecraft:behavior.nearest_attackable_target": {
        "reselect_targets": true,
        "set_persistent": true,
        "must_see": true,
        "entity_types": [
          {
            "filters": {
              "AND": [
                {
                  "test": "is_family",
                  "subject": 1,
                  "operator": 0,
                  "value": "player"
                }
              ]
            }
          },
          {
            "filters": {
              "AND": [
                {
                  "test": "is_family",
                  "subject": 1,
                  "operator": 0,
                  "value": "irongolem"
                }
              ]
            }
          },
          {
            "filters": {
              "AND": [
                {
                  "test": "is_family",
                  "subject": 1,
                  "operator": 0,
                  "value": "baby_turtle"
                },
                {
                  "test": "in_water",
                  "subject": 1,
                  "operator": 1,
                  "value": true
                }
              ]
            }
          }
        ],
        "priority": 2
      },
      "minecraft:behavior.random_look_around": {
        "priority": 6
      },
      "minecraft:behavior.random_stroll": {
        "priority": 5,
        "speed_multiplier": 1
      },
      "minecraft:behavior.ranged_attack": {
        "attack_interval_max": 3.0,
        "attack_interval_min": 1.0,
        "attack_radius": 15.0,
        "priority": 0,
        "set_persistent": true
      },
      "minecraft:breathable": {
        "breathes_lava": false,
        "breathes_water": true,
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:burns_in_daylight": {},
      "minecraft:can_climb": {},
      "minecraft:collision_box": {
        "height": 1.9,
        "width": 0.6
      },
      "minecraft:despawn": {
        "filters": [
          {
            "all_of": [
              {
                "test": "is_persistent",
                "value": false
              },
              {
                "operator": ">=",
                "test": "light_level",
                "value": 8
              },
              {
                "test": "is_daytime",
                "value": true
              },
              {
                "subject": "self",
                "test": "inactivity_timer",
                "value": 600
              },
              {
                "test": "random_chance",
                "value": 50
              },
              {
                "operator": ">",
                "test": "distance_to_nearest_player",
                "value": 54
              },
              {
                "test": "surface_mob",
                "value": true
              }
            ]
          }
        ]
      },
      "minecraft:environment_sensor": {
        "triggers": {
          "event": "minecraft:melee_mode",
          "filters": {
            "operator": "==",
            "test": "is_underwater",
            "subject": "self",
            "value": true
          }
        }
      },
      "minecraft:equipment": {
        "table": "loot_tables/entities/skeleton_gear.json"
      },
      "minecraft:experience_reward": {
        "on_death": {
          "expression": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0",
          "version": 0
        }
      },
      "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:jump.static": {},
      "minecraft:loot": {
        "table": "loot_tables/entities/stray.json"
      },
      "minecraft:movement": {
        "value": 0.25
      },
      "minecraft:movement.basic": {},
      "minecraft:nameable": {},
      "minecraft:navigation.walk": {
        "avoid_sun": true,
        "is_amphibious": true,
        "avoid_water": true,
        "using_door_annotation": true
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:shooter": {
        "aux_val": 19,
        "def": "minecraft:arrow"
      },
      "minecraft:type_family": {
        "family": [
          "stray",
          "skeleton",
          "monster",
          "mob",
          "undead"
        ]
      }
    },
    "component_groups": {
      "minecraft:melee_attack": {
        "minecraft:attack": {
          "damage": 3,
          "effect_duration": 10,
          "effect_name": "slowness"
        },
        "minecraft:behavior.melee_attack": {
          "speed_multiplier": 1.25,
          "track_target": true,
          "priority": 4
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "event": "minecraft:ranged_mode",
            "filters": {
              "operator": "==",
              "test": "in_water",
              "subject": "self",
              "value": false
            }
          }
        }
      },
      "minecraft:ranged_attack": {
        "minecraft:behavior.ranged_attack": {
          "attack_interval_max": 3.0,
          "attack_interval_min": 1.0,
          "attack_radius": 15.0,
          "priority": 0,
          "set_persistent": true
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "event": "minecraft:melee_mode",
            "filters": {
              "operator": "==",
              "test": "is_underwater",
              "subject": "self",
              "value": true
            }
          }
        },
        "minecraft:shooter": {
          "aux_val": 19,
          "def": "minecraft:arrow"
        }
      },
      "minecraft:revert_to_skeleton": {
        "minecraft:transformation": {
          "delay": 0.5,
          "into": "minecraft:skeleton"
        }
      }
    },
    "events": {
      "change_to_skeleton": {
        "sequence": [
          {
            "filters": {
              "test": "is_underground",
              "value": true
            },
            "add": {
              "component_groups": [
                "minecraft:revert_to_skeleton"
              ]
            },
            "remove": {}
          },
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "minecraft:revert_to_skeleton"
                  ]
                },
                "remove": {},
                "weight": 20
              },
              {
                "add": {},
                "remove": {},
                "weight": 80
              }
            ]
          }
        ]
      },
      "minecraft:melee_mode": {
        "add": {
          "component_groups": [
            "minecraft:melee_attack"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:ranged_attack"
          ]
        }
      },
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "minecraft:ranged_attack"
          ]
        }
      },
      "minecraft:ranged_mode": {
        "add": {
          "component_groups": [
            "minecraft:ranged_attack"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:melee_attack"
          ]
        }
      }
    }
  }
}