{
    "format_version": "1.20.50",
    "minecraft:entity": {
        "description": {
            "identifier": "rc:cannon",
            "is_summonable": true,
            "properties": {
                "rc:y_rotation": {
                    "client_sync": true,
                    "range": [-180.0, 180.0],
                    "default": 0.0,
                    "type": "float"
                },
                "rc:z_rotation": {
                    "client_sync": true,
                    "range": [-180.0, 180.0],
                    "default": 0.0,
                    "type": "float"
                }
            }
        },
        "component_groups": {},
        "components": {
            "minecraft:collision_box": {
                "height": 0,
                "width": 0
            },
            "minecraft:damage_sensor": {
                "triggers": [
                    {
                        "cause": "all",
                        "deals_damage": false
                    }
                ]
            },
            "minecraft:inside_block_notifier": {
                "block_list": [
                    {
                        "block": {
                            "name": "rc:cannon"
                        },
                        "exited_block_event": {
                            "event": "despawn_cannon",
                            "target": "self"
                        }
                    }
                ]
            },
            "minecraft:physics": {
                "has_collision": false,
                "has_gravity": false,
                "push_towards_closest_space": false
            },
            "minecraft:pushable": {
                "is_pushable": false,
                "is_pushable_by_piston": false
            }
        },
        "events": {
            "despawn_cannon":{},
            "minecraft:entity_spawned": {
                "run_command": {
                    "command": ["execute align xyz positioned ~0.5 ~ ~0.5 run tp ~~~"]
                }
            }
        }
    }
}