{
    "format_version": "1.21.20",
    "minecraft:block": {
        "description": {
            "identifier": "mdnext:palestine_flag_mdnext",
            "menu_category": {
                "category": "items",
                "group": "itemGroup.name.flag"
            },
            "traits": {
                "minecraft:placement_direction": {
                    "enabled_states": [
                        "minecraft:cardinal_direction"
                    ]
                }
            },
            "states": {
                "md:top": [
                    0,
                    1
                ],
                "md:bottom": [
                    0,
                    1
                ]
            }
        },
        "permutations": [
            {
                "condition": "q.block_state('minecraft:cardinal_direction') == 'north'",
                "components": {
                    "minecraft:transformation": {
                        "rotation": [
                            0,
                            180,
                            0
                        ]
                    }
                }
            },
            {
                "condition": "q.block_state('minecraft:cardinal_direction') == 'south'",
                "components": {
                    "minecraft:transformation": {
                        "rotation": [
                            0,
                            0,
                            0
                        ]
                    }
                }
            },
            {
                "condition": "q.block_state('minecraft:cardinal_direction') == 'east'",
                "components": {
                    "minecraft:transformation": {
                        "rotation": [
                            0,
                            90,
                            0
                        ]
                    }
                }
            },
            {
                "condition": "q.block_state('minecraft:cardinal_direction') == 'west'",
                "components": {
                    "minecraft:transformation": {
                        "rotation": [
                            0,
                            -90,
                            0
                        ]
                    }
                }
            },
            {
                "condition": "(q.block_state('md:bottom') && !q.block_state('md:top'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.flags_mdnext",
                        "bone_visibility": {
                            "bottom": false,
                            "middle": false,
                            "top": true
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('md:bottom') && q.block_state('md:top'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.flags_mdnext",
                        "bone_visibility": {
                            "bottom": false,
                            "middle": true,
                            "top": false
                        }
                    }
                }
            },
            {
                "condition": "(!q.block_state('md:bottom') && q.block_state('md:top'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.flags_mdnext",
                        "bone_visibility": {
                            "bottom": true,
                            "middle": false,
                            "top": false
                        }
                    }
                }
            }
        ],
        "components": {
            "tag:palestine_flag_mdnext": {},
            "minecraft:geometry": {
                "identifier": "geometry.flags_mdnext"
            },
            "minecraft:material_instances": {
                "1": {
                    "texture": "palestine_flag",
                    "render_method": "opaque"
                },
                "*": {
                    "texture": "metal_dark_md",
                    "render_method": "opaque"
                }
            },
            "minecraft:collision_box": {
                "origin": [
                    -3,
                    0,
                    -3
                ],
                "size": [
                    6,
                    16,
                    6
                ]
            },
            "minecraft:selection_box": {
                "origin": [
                    -3,
                    0,
                    -3
                ],
                "size": [
                    6,
                    16,
                    6
                ]
            },
            "minecraft:light_dampening": 0,
            "minecraft:light_emission": 0,
            "minecraft:custom_components": [
                "md:vertical_connected",
                "md:vertical_destroy"
            ]
        }
    }
}