{
    "format_version": "1.10.0",
    "minecraft:entity": {
        "description": {
            "identifier": "minecraft:player",
            "is_spawnable": false,
            "is_summonable": false,
            "is_experimental": false
        },
        "component_groups": {
            "costume": {
                "minecraft:skin_id": {
                    "value": 1
                }
            },
            "despawn": {
                "minecraft:instant_despawn": {}
            },
            "powerup": {
                "minecraft:is_saddled": {},
                "minecraft:damage_sensor": {
                    "triggers": {
                        "cause": "all",
                        "deals_damage": false
                    }
                },
                "minecraft:behavior.ranged_attack": {
                    "swing": true,
                    "attack_interval": 0.5,
                    "attack_radius": 30,
                    "burst_shots": 1
                },
                "minecraft:shooter": {
                    "def": "gpvz:cactus_ball_bullet<powerup>",
                    "sound": "attack"
                },
                "minecraft:timer": {
                    "time": 3,
                    "time_down_event": {
                        "event": "powerdown",
                        "target": "self"
                    }
                }
            },
            "normal": {
                "minecraft:behavior.ranged_attack": {
                    "swing": true,
                    "priority": 1,
                    "attack_interval": 2,
                    "attack_radius": 30,
                    "burst_shots": 1
                },
                "minecraft:shooter": {
                    "sound": "attack",
                    "def": "gpvz:cactus_ball_bullet"
                },
                "minecraft:interact": {
                    "interactions": [
                        {
                            "on_interact": {
                                "filters": [
                                    {
                                        "all_of": [
                                            {
                                                "test": "has_equipment",
                                                "subject": "other",
                                                "domain": "hand",
                                                "value": "gpvz:gardening_glove"
                                            }
                                        ]
                                    }
                                ],
                                "target": "self",
                                "event": "despawn"
                            },
                            "use_item": true,
                            "transform_to_item": "gpvz:ball_cactus_seedpacket",
                            "play_sounds": "disappeared",
                            "interact_text": "Pick Up!"
                        },
                        {
                            "on_interact": {
                                "filters": [
                                    {
                                        "all_of": [
                                            {
                                                "test": "has_equipment",
                                                "subject": "other",
                                                "domain": "hand",
                                                "value": "gpvz:energy_bean"
                                            }
                                        ]
                                    }
                                ],
                                "target": "self",
                                "event": "powerup"
                            },
                            "use_item": true,
                            "interact_text": "Power Up!"
                        },
                        {
                            "on_interact": {
                                "filters": [
                                    {
                                        "all_of": [
                                            {
                                                "test": "has_equipment",
                                                "subject": "other",
                                                "domain": "hand",
                                                "value": "gpvz:shovel_item"
                                            }
                                        ]
                                    }
                                ],
                                "target": "self",
                                "event": "despawn"
                            },
                            "use_item": false,
                            "play_sounds": "disappeared",
                            "interact_text": "Dig Up!"
                        }
                    ]
                },
                "minecraft:damage_sensor": {
                    "triggers": [
                        {
                            "on_damage": {
                                "filters": {
                                    "test": "is_family",
                                    "subject": "other",
                                    "value": "plants"
                                }
                            },
                            "deals_damage": false
                        },
                        {
                            "on_damage": {
                                "filters": {
                                    "test": "is_family",
                                    "subject": "other",
                                    "value": "bullet"
                                }
                            },
                            "deals_damage": false
                        },
                        {
                            "on_damage": {
                                "filters": {
                                    "test": "is_family",
                                    "subject": "other",
                                    "value": "bomb"
                                }
                            },
                            "deals_damage": false
                        }
                    ]
                }
            },
            "powerdown": {
                "minecraft:transformation": {
                    "into": "gpvz:ball_cactus<normal>",
                    "delay": 0
                }
            }
        },
        "components": {
            "minecraft:skin_id": {
                "value": 0
            },
            "minecraft:is_stackable": {},
            "minecraft:breathable": {
                "total_supply": 1,
                "suffocate_time": 0,
                "breathes_water": false,
                "generates_bubbles": false
            },
            "minecraft:health": {
                "value": 30,
                "max": 30
            },
            "minecraft:pushable": {
                "is_pushable": false,
                "is_pushable_by_piston": false
            },
            "minecraft:collision_box": {
                "width": 0.8,
                "height": 0.95
            },
            "minecraft:movement": {
                "value": 0,
                "max": 0
            },
            "minecraft:movement.basic": {
                "max_turn": 360
            },
            "minecraft:underwater_movement": {
                "value": 0
            },
            "minecraft:scale": {
                "value": 1
            },
            "minecraft:knockback_resistance": {
                "value": 1
            },
            "minecraft:navigation.generic": {
                "can_walk": false,
                "can_swim": false
            },
            "minecraft:type_family": {
                "family": [
                    "plants",
                    "mob",
                    "player"
                ]
            },
            "minecraft:behavior.random_look_around": {
                "priority": 6
            },
            "minecraft:follow_range": {
                "value": 30
            },
            "minecraft:behavior.nearest_attackable_target": {
                "priority": 1,
                "reselect_targets": true,
                "entity_types": [
                    {
                        "filters": {
                            "test": "is_family",
                            "subject": "other",
                            "value": "monster"
                        },
                        "max_dist": 30
                    }
                ],
                "must_see": true
            },
            "minecraft:physics": {}
        },
        "events": {
            "minecraft:entity_spawned": {
                "add": {
                    "component_groups": [
                        "normal"
                    ]
                }
            },
            "costume": {
                "add": {
                    "component_groups": [
                        "costume"
                    ]
                }
            },
            "despawn": {
                "add": {
                    "component_groups": [
                        "despawn"
                    ]
                }
            },
            "normal": {
                "add": {
                    "component_groups": [
                        "normal"
                    ]
                }
            },
            "powerup": {
                "add": {
                    "component_groups": [
                        "powerup"
                    ]
                },
                "remove": {
                    "component_groups": [
                        "normal"
                    ]
                }
            },
            "powerdown": {
                "add": {
                    "component_groups": [
                        "powerdown"
                    ]
                }
            }
        }
    }
}
how to uses & works components