{
    "format_version": "1.16.100",
    "minecraft:entity": {
        "description": {
            "identifier": "cc_fairytales:syren",
            "is_spawnable": true,
            "is_summonable": true,
            "is_experimental": false
        },
        "component_groups": {
            "syren_rosa": {
                "minecraft:variant": {
                    "value": 0
                }
            },
            "syren_azul": {
                "minecraft:variant": {
                    "value": 1
                }
            },
            "syren_morada": {
                "minecraft:variant": {
                    "value": 2
                }
            },
            "syren_amarilla": {
                "minecraft:variant": {
                    "value": 3
                }
            },
            "sirena_calmada": {
                "minecraft:on_target_acquired": {
                    "event": "enojada",
                    "target": "self"
                },
                "minecraft:underwater_movement": {
                    "value": 0.2
                }
            },
            "sirena_enojada": {
                "minecraft:angry": {
                    "duration": 25 ,
                    "angry_sound": "angry",
                    "sound_interval":[
                        5,
                        8
                    ],
                    "calm_event": {
                        "event": "calmada",
                        "target": "self"
                    }
                },
                "minecraft:mob_effect": {
                    "effect_range": 30,
                    "effect_time": 10,
                    "mob_effect": "nausea",
                    "entity_filter": [
                        {
                            "all_of": [
                                {
                                    "test": "is_family",
                                    "subject": "other",
                                    "value": "player"
                                },
                                {
                                    "operator": "==",
                                    "test": "is_target",
                                    "subject": "other",
                                    "value": true
                                }
                            ]
                        }
                    ]
                },
                "minecraft:underwater_movement": {
                    "value": 0.35
                }
            }
        },
        "components": {
            "minecraft:ambient_sound_interval": {
                "event_name": "ambient",
                "range": 16,
                "value": 8
            },
            "minecraft:is_hidden_when_invisible": {},
            "minecraft:type_family": {
                "family": [
                    "syren",
                    "monster",
                    "mob"
                ]
            },
            "minecraft:experience_reward": {
                "on_death": "query.last_hit_by_player ? 10"
            },
            "minecraft:nameable": {},
            "minecraft:loot": {
                "table": "loot_tables/chillcraft/fairy/entities/syren.json"
            },
            "minecraft:behavior.random_swim": {
                "priority": 5,
                "interval": 10, 
                "speed_multiplier": 0.8, 
                "xz_dist": 10, 
                "y_dist": 5
            },
            "minecraft:underwater_movement": {
                "value": 0.45
            },
            "minecraft:behavior.move_to_water": {
                "priority": 1,
                "search_range": 30,
                "search_height": 30,
                "speed_multiplier": 1
            },"minecraft:behavior.random_breach": {
                "priority": 6,
                "interval": 50,
                "xz_dist": 6,
                "cooldown_time": 2.0
            },
            "minecraft:navigation.generic": {
                "is_amphibious": true,
                "can_path_over_water": true,
                "can_swim": true,
                "can_walk": true,
                "can_breach": true,
                "can_sink": false
            },
            "minecraft:follow_range": {
                "value": 48,
                "max": 48
            },
            "minecraft:health": {
                "value": 50
            },
            "minecraft:attack": {
                "damage": 5
            },
            "minecraft:collision_box": {
                "width": 0.9,
                "height": 0.9
            },
            "minecraft:movement.generic": {},
            "minecraft:movement": {
                "value": 0.5
            },
            "minecraft:behavior.melee_box_attack": {
                "priority": 2,
                "track_target": true,
                "cooldown_time": 1
            },
            "minecraft:lookat": {
                "search_radius": 64.0,
                "set_target": true,
                "look_cooldown": 5.0,
                "filters": {
                    "all_of": [
                        {
                            "subject": "other",
                            "test": "is_family",
                            "value": "player"
                        }
                    ]
                }
            },
            "minecraft:despawn": {
                "despawn_from_distance": {}
            },
            "minecraft:jump.static": {
                "jump_power": 0.6
            },
            "minecraft:can_climb": {},
            "minecraft:behavior.look_at_player": {
                "priority": 8,
                "look_distance": 8.0
            },
            "minecraft:behavior.random_look_around": {
                "priority": 7
            },
            "minecraft:behavior.hurt_by_target": {
                "priority": 1
            },
            "minecraft:physics": {},
            "minecraft:pushable": {
                "is_pushable": true,
                "is_pushable_by_piston": true
            },
            "minecraft:on_target_acquired": "enojada"
        },
        "events": {
            "minecraft:entity_spawned": {
                "sequence": [
                    {
                        "randomize": [
                            {
                                "add": {
                                    "component_groups": [
                                        "syren_rosa"
                                    ]
                                },
                                "weight": 1
                            },
                            {
                                "add": {
                                    "component_groups": [
                                        "syren_azul"
                                    ]
                                },
                                "weight": 1
                            },
                            {
                                "add": {
                                    "component_groups": [
                                        "syren_amarilla"
                                    ]
                                },
                                "weight": 1
                            },
                            {
                                "add": {
                                    "component_groups": [
                                        "syren_morada"
                                    ]
                                },
                                "weight": 1
                            }
                        ]
                    },
                    {
                        "remove": {},
                        "add": {
                            "component_groups": [
                                "sirena_calmada"
                            ]
                        }
                    }
                ]
            },
            "enojada": {
                "remove": {
                    "component_groups": [
                        "sirena_calmada"
                    ]
                },
                "add": {
                    "component_groups": [
                        "sirena_enojada"
                    ]
                }
            },
            "calmada": {
                "remove": {
                    "component_groups": [
                        "sirena_enojada"
                    ]
                },
                "add": {
                    "component_groups": [
                        "sirena_calmada"
                    ]
                }
            }
        }
    }
}