{
    "format_version": "1.16.0",
    "minecraft:block": {
        "description": {
            "identifier": "furnicraft:valla_amarillo",
            "properties": {
                "furnicraft:state1": [
                    0,
                    1
                ],
                "furnicraft:state2": [
                    0,
                    1
                ],
                "furnicraft:state3": [
                    0,
                    1
                ],
                "furnicraft:state4": [
                    0,
                    1
                ]
            }
        },
        "components": {
            "minecraft:creative_category": {
                "group": "itemGroup.name.fence",
                "category": "construction"
            },
            "tag:wood": {},
            "tag:fence": {},
            "minecraft:unwalkable": true,
            "minecraft:block_light_absorption": 1,
            "minecraft:destroy_time": 0.5,
            "minecraft:geometry": "geometry.vallas2",
            "minecraft:material_instances": {
                "*": {
                    "texture": "block",
                    "render_method": "opaque"
                }
            },
            "minecraft:entity_collision": {
                "origin": [
                    -2,
                    0,
                    -2
                ],
                "size": [
                    4,
                    16,
                    4
                ]
            },
            "minecraft:pick_collision": {
                "origin": [
                    -2,
                    0,
                    -2
                ],
                "size": [
                    4,
                    16,
                    4
                ]
            },
            "minecraft:ticking": {
                "looping": true,
                "range": [
                    0,
                    0
                ],
                "on_tick": {
                    "event": "states",
                    "target": "self"
                }
            },
            "minecraft:part_visibility": {
                "rules": {
                    "n2": "query.block_property('furnicraft:state2') == 1",
                    "n1": "query.block_property('furnicraft:state1') == 1",
                    "n4": "query.block_property('furnicraft:state4') == 1",
                    "n3": "query.block_property('furnicraft:state3') == 1"
                }
            }
        },
        "events": {
            "states": {
                "sequence": [
                    {
                        "condition": "q.block_neighbor_has_any_tag(-1,0,0,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state2": 1
                        }
                    },
                    {
                        "condition": "q.block_neighbor_has_any_tag(1,0,0,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state1": 1
                        }
                    },
                    {
                        "condition": "q.block_neighbor_has_any_tag(0,0,-1,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state4": 1
                        }
                    },
                    {
                        "condition": "q.block_neighbor_has_any_tag(0,0,1,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state3": 1
                        }
                    },
                    {
                        "condition": "!q.block_neighbor_has_any_tag(-1,0,0,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state2": 0
                        }
                    },
                    {
                        "condition": "!q.block_neighbor_has_any_tag(1,0,0,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state1": 0
                        }
                    },
                    {
                        "condition": "!q.block_neighbor_has_any_tag(0,0,-1,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state4": 0
                        }
                    },
                    {
                        "condition": "!q.block_neighbor_has_any_tag(0,0,1,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state3": 0
                        }
                    }
                ]
            },
            "check_states": {
                "sequence": [
                    {
                        "condition": "!q.block_neighbor_has_any_tag(1,0,0,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state2": 0
                        }
                    },
                    {
                        "condition": "!q.block_neighbor_has_any_tag(-1,0,0,'wood','fence','stone','metal','diamond_pick_diggable','mangrove_replaceable','dirt','sand','gravel','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state1": 0
                        }
                    },
                    {
                        "condition": "!q.block_neighbor_has_any_tag(0,0,-1,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state4": 0
                        }
                    },
                    {
                        "condition": "!q.block_neighbor_has_any_tag(0,0,1,'wood','metal','mangrove_replaceable','stone','fence','diamond_pick_diggable','dirt','gravel','sand','grass','concrete:7')",
                        "set_block_property": {
                            "furnicraft:state3": 0
                        }
                    }
                ]
            }
        },
        "permutations": [
            {
                "condition": "query.block_property('furnicraft:state1') == 0 || query.block_property('furnicraft:state2') == 0 || query.block_property('furnicraft:state3') == 0 || query.block_property('furnicraft:state4') == 0",
                "components": {
                    "minecraft:entity_collision": {
                        "origin": [
                            -2,
                            0,
                            -2
                        ],
                        "size": [
                            4,
                            16,
                            4
                        ]
                    },
	                "minecraft:preventsjumping": true,
                    "minecraft:pick_collision": {
                        "origin": [
                            -2,
                            0,
                            -2
                        ],
                        "size": [
                            4,
                            16,
                            4
                        ]
                    }
                }
            },
            {
                "condition": "query.block_property('furnicraft:state1') == 1 || query.block_property('furnicraft:state2') == 1 || query.block_property('furnicraft:state3') == 1 || query.block_property('furnicraft:state4') == 1",
                "components": {
                    "minecraft:entity_collision": true,
                    "minecraft:pick_collision": true
                }
            }
        ]
    }
}