{
   "format_version":"1.16.100",
   "minecraft:block":{
      "description":{
         "identifier":"vatonage:dark_oak_table",
         "register_to_creative_menu":true,
         "properties":{
            "vatonage:leg1":[
               0,
               1
            ],
            "vatonage:leg2":[
               0,
               1
            ],
            "vatonage:leg3":[
               0,
               1
            ],
            "vatonage:leg4":[
               0,
               1
            ]
         }
      },
      "components":{
         "minecraft:creative_category":{
            "category":"construction"
         },
         "minecraft:material_instances":{
            "*":{
               "texture":"dark_oak_planks",
               "render_method":"alpha_test"
            }
         },
         "minecraft:pick_collision":{
            "origin":[
               -8,
               0,
               -8
            ],
            "size":[
               16,
               16,
               16
            ]
         },
         "minecraft:entity_collision":{
            "origin":[
               -8,
               0,
               -8
            ],
            "size":[
               16,
               16,
               16
            ]
         },
         "minecraft:geometry":"geometry.tablev",
         "minecraft:destroy_time":0.2,
         "minecraft:block_light_absorption":0,
         "minecraft:part_visibility": {
             "rules": {
                 "leg1": "q.block_property('vatonage:leg1') == 0",
                 "leg2": "q.block_property('vatonage:leg2') == 0",
                 "leg3": "q.block_property('vatonage:leg3') == 0",
                 "leg4": "q.block_property('vatonage:leg4') == 0"
             }
         },
         "tag:table": {},
         "minecraft:on_placed":{
            "event":"vatonage:place"
         },
         "minecraft:ticking": {
            "looping": true,
            "range": [ 0, 0 ],
            "on_tick": {
               "event": "vatonage:place",
               "target": "self"
            }
         }
      },
      "events":{
         "vatonage:place":{
            "sequence":[

                {
                    "condition": "q.block_neighbor_has_any_tag(0,0,-1,'table')",
                    "set_block_property": {
                        "vatonage:leg1": 1,
                        "vatonage:leg3": 1
                    }
                },
                {
                    "condition": "q.block_neighbor_has_any_tag(0,0,1,'table')",
                    "set_block_property": {
                        "vatonage:leg2": 1,
                        "vatonage:leg4": 1
                    }
                },
                {
                    "condition": "q.block_neighbor_has_any_tag(-1,0,0,'table')",
                    "set_block_property": {
                        "vatonage:leg3": 1,
                        "vatonage:leg4": 1
                    }
                },
                {
                    "condition": "q.block_neighbor_has_any_tag(1,0,0,'table')",
                    "set_block_property": {
                        "vatonage:leg1": 1,
                        "vatonage:leg2": 1
                    }
                }
            ]
         }
      }
   }
}