{
    "format_version": "1.21.130",
    "minecraft:entity": {
        "description": {
            "identifier": "minecraft:parched",
            "spawn_category": "monster",
            "is_spawnable": true,
            "is_summonable": true
        },

        "component_groups": {
            "minecraft:ranged_attack": {
                "minecraft:behavior.ranged_attack": {
                    "priority": 1,
                    "attack_interval": 3.5,
                    "attack_radius": 15.0
                },
                "minecraft:shooter": {
                    "def": "minecraft:arrow",
                    "sound": "bow",
                    "aux_val": 35
                },
                "minecraft:environment_sensor": {
                    "triggers": [
                        {
                            "filters": {
                                "test": "is_underwater"
                            },
                            "event": "minecraft:melee_mode"
                        },
                        {
                            "filters": {
                                "test": "has_ranged_weapon",
                                "value": false
                            },
                            "event": "minecraft:melee_mode"
                        }
                    ]
                }
            },
            "minecraft:melee_attack": {
                "minecraft:behavior.melee_box_attack": {
                    "priority": 4,
                    "track_target": true,
                    "speed_multiplier": 1.25
                },
                "minecraft:attack": {
                    "damage": 2
                },
                "minecraft:environment_sensor": {
                    "triggers": [
                        {
                            "filters": {
                                "all_of": [
                                    {
                                        "test": "in_water",
                                        "value": false
                                    },
                                    {
                                        "test": "has_ranged_weapon"
                                    }
                                ]
                            },
                            "event": "minecraft:ranged_mode"
                        }
                    ]
                }
            }
        },
        "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:breathable": {
                "total_supply": 15,
                "suffocate_time": 0,
                "breathes_water": true
            },
            "minecraft:equip_item": {
                "excluded_items": [
                    {
                        "item": "minecraft:banner:15"
                    }
                ]
            },
            "minecraft:collision_box": {
                "width": 0.6,
                "height": 1.9
            },
            "minecraft:nameable": {},
            "minecraft:health": {
                "value": 16,
                "max": 16
            },
            "minecraft:hurt_on_condition": {
                "damage_conditions": [
                    {
                        "filters": {
                            "test": "in_lava"
                        },
                        "cause": "lava",
                        "damage_per_tick": 4
                    }
                ]
            },
            "minecraft:loot": {
                "table": "loot_tables/entities/parched.json"
            },
            "minecraft:movement": {
                "value": 0.25
            },
            "minecraft:navigation.walk": {
                "is_amphibious": true,
                "avoid_sun": true,
                "avoid_water": true
            },
            "minecraft:movement.basic": {
            },
            "minecraft:jump.static": {
            },
            "minecraft:can_climb": {
            },
            "minecraft:equipment": {
                "table": "loot_tables/entities/skeleton_gear.json"
            },
            "minecraft:environment_sensor": {
                "triggers": [
                    {
                        "filters": {
                            "test": "is_underwater"
                        },
                        "event": "minecraft:melee_mode"
                    },
                    {
                        "filters": {
                            "test": "has_ranged_weapon",
                            "value": false
                        },
                        "event": "minecraft:melee_mode"
                    }
                ]
            },
            "minecraft:despawn": {
                "despawn_from_distance": {}
            },
            "minecraft:shareables": {
                "singular_pickup": true,
                "items": [
                    {
                        "item": "minecraft:netherite_sword",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 0
                    },
                    {
                        "item": "minecraft:diamond_sword",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 1
                    },
                    {
                        "item": "minecraft:iron_sword",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 2
                    },
                    {
                        "item": "minecraft:golden_sword",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 3
                    },
                    {
                        "item": "minecraft:copper_sword",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 4
                    },
                    {
                        "item": "minecraft:stone_sword",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 5
                    },
                    {
                        "item": "minecraft:wooden_sword",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 6
                    },
                    {
                        "item": "minecraft:bow",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 6
                    },
                    {
                        "item": "minecraft:netherite_helmet",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 0
                    },
                    {
                        "item": "minecraft:diamond_helmet",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 1
                    },
                    {
                        "item": "minecraft:iron_helmet",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 2
                    },
                    {
                        "item": "minecraft:chainmail_helmet",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 3
                    },
                    {
                        "item": "minecraft:golden_helmet",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 4
                    },
                    {
                        "item": "minecraft:copper_helmet",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 5
                    },
                    {
                        "item": "minecraft:leather_helmet",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 6
                    },
                    {
                        "item": "minecraft:turtle_helmet",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 7
                    },
                    {
                        "item": "minecraft:skull:0",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 8
                    },
                    {
                        "item": "minecraft:skull:1",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 8
                    },
                    {
                        "item": "minecraft:carved_pumpkin",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 8
                    },
                    {
                        "item": "minecraft:netherite_chestplate",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 0
                    },
                    {
                        "item": "minecraft:diamond_chestplate",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 1
                    },
                    {
                        "item": "minecraft:iron_chestplate",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 2
                    },
                    {
                        "item": "minecraft:chainmail_chestplate",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 3
                    },
                    {
                        "item": "minecraft:golden_chestplate",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 4
                    },
                    {
                        "item": "minecraft:copper_chestplate",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 5
                    },
                    {
                        "item": "minecraft:leather_chestplate",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 6
                    },
                    {
                        "item": "minecraft:netherite_leggings",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 0
                    },
                    {
                        "item": "minecraft:diamond_leggings",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 1
                    },
                    {
                        "item": "minecraft:iron_leggings",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 2
                    },
                    {
                        "item": "minecraft:chainmail_leggings",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 3
                    },
                    {
                        "item": "minecraft:golden_leggings",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 4
                    },
                    {
                        "item": "minecraft:copper_leggings",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 5
                    },
                    {
                        "item": "minecraft:leather_leggings",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 6
                    },
                    {
                        "item": "minecraft:netherite_boots",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 0
                    },
                    {
                        "item": "minecraft:diamond_boots",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 1
                    },
                    {
                        "item": "minecraft:iron_boots",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 2
                    },
                    {
                        "item": "minecraft:chainmail_boots",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 3
                    },
                    {
                        "item": "minecraft:golden_boots",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 4
                    },
                    {
                        "item": "minecraft:copper_boots",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 5
                    },
                    {
                        "item": "minecraft:leather_boots",
                        "want_amount": 1,
                        "surplus_amount": 1,
                        "priority": 6
                    }
                ]
            },
            "minecraft:behavior.hurt_by_target": {
                "priority": 2,
                "entity_types": [
                    {
                        "filters": {
                            "test": "is_family",
                            "subject": "other",
                            "operator": "!=",
                            "value": "breeze"
                        }
                    }
                ]
            },
            "minecraft:behavior.nearest_attackable_target": {
                "priority": 2,
                "must_see": true,
                "reselect_targets": true,

                "entity_types": [
                    {
                        "filters": {
                            "test": "is_family",
                            "subject": "other",
                            "value": "player"
                        },
                        "max_dist": 16
                    },
                    {
                        "filters": {
                            "test": "is_family",
                            "subject": "other",
                            "value": "irongolem"
                        },
                        "max_dist": 16
                    },
                    {
                        "filters": {
                            "all_of": [
                                {
                                    "test": "is_family",
                                    "subject": "other",
                                    "value": "baby_turtle"
                                },
                                {
                                    "test": "in_water",
                                    "subject": "other",
                                    "value": false
                                }
                            ]
                        },
                        "max_dist": 16
                    }
                ]
            },

            "minecraft:behavior.flee_sun": {
                "priority": 3,
                "speed_multiplier": 1
            },
            "minecraft:behavior.equip_item": {
                "priority": 4
            },
            "minecraft:behavior.avoid_mob_type": {
                "priority": 5,
                "entity_types": [
                    {
                        "filters": {
                            "test": "is_family",
                            "subject": "other",
                            "value": "wolf"
                        },
                        "max_dist": 6,
                        "walk_speed_multiplier": 1.2,
                        "sprint_speed_multiplier": 1.2
                    }
                ]
            },
            "minecraft:behavior.pickup_items": {
                "priority": 6,
                "max_dist": 3,
                "goal_radius": 2,
                "speed_multiplier": 1.0,
                "pickup_based_on_chance": true,
                "can_pickup_any_item": true
            },
            "minecraft:behavior.random_stroll": {
                "priority": 7,
                "speed_multiplier": 1
            },
            "minecraft:behavior.look_at_player": {
                "priority": 8,
                "look_distance": 8
            },
            "minecraft:behavior.random_look_around": {
                "priority": 9
            },
            "minecraft:type_family": {
                "family": [ "parched", "skeleton", "monster", "mob", "undead" ]
            },
            "minecraft:physics": {
            },
            "minecraft:pushable": {
                "is_pushable": true,
                "is_pushable_by_piston": true
            },
            "minecraft:conditional_bandwidth_optimization": {
            },
            "minecraft:mob_effect_immunity": {
                "mob_effects": [
                    "weakness"
                ]
            }
        },

        "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" ] }
            }
        }
    }
}
