{
    "format_version": "1.21.20",
    "minecraft:block": {
        "description": {
            "identifier": "mdrb:glass_railing_mdrb",
            "menu_category": {
                "category": "items"
            },
            "traits": {
                "minecraft:placement_direction": {
                    "enabled_states": [
                        "minecraft:cardinal_direction"
                    ]
                }
            },
            "states": {
                "md:north_neighbor": [
                    0,
                    1
                ],
                "md:east_neighbor": [
                    0,
                    1
                ],
                "md:south_neighbor": [
                    0,
                    1
                ],
                "md:west_neighbor": [
                    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('minecraft:cardinal_direction') == 'north' || q.block_state('minecraft:cardinal_direction') == 'south') && (!q.block_state('md:east_neighbor') && !q.block_state('md:west_neighbor'))) || ((q.block_state('minecraft:cardinal_direction') == 'west' || q.block_state('minecraft:cardinal_direction') == 'east') && (!q.block_state('md:north_neighbor') && !q.block_state('md:south_neighbor')))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:east_neighbor') && !q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:west_neighbor') && !q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:north_neighbor') && !q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:south_neighbor') && !q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' || q.block_state('minecraft:cardinal_direction') == 'south') && (q.block_state('md:east_neighbor') && q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' || q.block_state('minecraft:cardinal_direction') == 'east') && (q.block_state('md:north_neighbor') && q.block_state('md:south_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:west_neighbor') && !q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:east_neighbor') && !q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:south_neighbor') && !q.block_state('md:north_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:north_neighbor') && !q.block_state('md:south_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && !q.block_state('md:north_neighbor') && q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && !q.block_state('md:south_neighbor') && q.block_state('md:north_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && !q.block_state('md:west_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && !q.block_state('md:east_neighbor') && q.block_state('md:west_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:north_neighbor') && q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:south_neighbor') && q.block_state('md:north_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:west_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:east_neighbor') && q.block_state('md:west_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:north_neighbor') && !q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:south_neighbor') && !q.block_state('md:north_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:west_neighbor') && !q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:east_neighbor') && !q.block_state('md:west_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:north_neighbor') && !q.block_state('md:east_neighbor') && q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:south_neighbor') && !q.block_state('md:west_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:west_neighbor') && !q.block_state('md:north_neighbor') && q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:east_neighbor') && !q.block_state('md:south_neighbor') && q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && !q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && !q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && !q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && !q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('md:north_neighbor') && !q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('md:south_neighbor') && !q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('md:west_neighbor') && !q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('md:east_neighbor') && !q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && !q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && !q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && !q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && !q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && !q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && !q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && !q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && !q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": true,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && !q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && !q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && !q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && !q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": false
                        }
                    }
                }
            },
            {
                "condition": "(q.block_state('minecraft:cardinal_direction') == 'north' && !q.block_state('md:north_neighbor') && !q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'south' && !q.block_state('md:south_neighbor') && !q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'west' && !q.block_state('md:west_neighbor') && !q.block_state('md:north_neighbor') && q.block_state('md:east_neighbor') && q.block_state('md:south_neighbor')) || (q.block_state('minecraft:cardinal_direction') == 'east' && !q.block_state('md:east_neighbor') && !q.block_state('md:south_neighbor') && q.block_state('md:west_neighbor') && q.block_state('md:north_neighbor'))",
                "components": {
                    "minecraft:geometry": {
                        "identifier": "geometry.glass_railing_mdrb",
                        "bone_visibility": {
                            "main": true,
                            "left": false,
                            "right": true
                        }
                    }
                }
            }
        ],
        "components": {
            "tag:glass_railing_mdrb": {},
            "minecraft:geometry": "geometry.glass_railing_mdrb",
            "minecraft:material_instances": {
                "*": {
                    "texture": "glass_railing_mdrb",
                    "render_method": "alpha_test"
                }
            },
            "minecraft:collision_box": {
                "origin": [
                    -8,
                    0,
                    -8
                ],
                "size": [
                    16,
                    16,
                    16
                ]
            },
            "minecraft:selection_box": {
                "origin": [
                    -8,
                    0,
                    -8
                ],
                "size": [
                    16,
                    16,
                    16
                ]
            },
            "minecraft:light_dampening": 0,
            "minecraft:light_emission": 0,
            "minecraft:custom_components": [
                "md:horizontal_full_connected",
                "md:horizontal_full_destroy"
            ]
        }
    }
}