{
  "format_version": "1.21.80",
  "minecraft:block": {
    "description": {
      "identifier": "drz:garage_door_drz",
      "menu_category": {"category": "construction"},
      "traits": {
        "minecraft:placement_direction": {
          "enabled_states": ["minecraft:cardinal_direction"]
        }
      },
      "states": {
        "drz:top": [false, true],
        "drz:bottom" : [false, true],
        "drz:hide": [0, 1, 2],
        "drz:open": [false, true],
        "drz:tick": [false, true]
      }
    },
    "permutations": [
      {
        "condition": "q.block_state('minecraft:cardinal_direction') == 'north'",
        "components": {
          "minecraft:transformation": { "rotation": [0, 180, 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('drz:tick')",
        "components": {
          "minecraft:tick": { "looping": true, "interval_range": [2,2] },
          "minecraft:custom_components": [
            "drz:garage_tick"
          ]
        }
      },
      {
        "condition": "q.block_state('drz:hide') >= 1",
        "components": {
          "minecraft:collision_box": false
        }
      },
      {
        "condition": "q.block_state('drz:hide') == 2",
        "components": {
          "minecraft:selection_box": false
        }
      }
    ],
    "components": {
      "tag:open:open.iron_door": {},
      "tag:close:close.iron_door": {},
      "tag:drz:garage_door": {},
      "tag:minecraft:is_pickaxe_item_destructible": {},
      "tag:decorize": {},
      "minecraft:geometry": {
        "identifier": "geometry.garage_door_drz",
        "culling": "drz:garage_door",
        "bone_visibility": {
          "top" : "!q.block_state('drz:top') || q.block_state('drz:hide') == 1",
          "mid" : "q.block_state('drz:hide') == 0",
          "bottom" : "!q.block_state('drz:bottom') && q.block_state('drz:hide') == 0"
        }
      },
      "minecraft:material_instances": {
        "*": {
          "texture": "garage_door_drz"
        }
      },
      "minecraft:destruction_particles": {
        "texture": "garage_door_drz"
      },
      "minecraft:collision_box": {
        "origin": [-8, 0, -1],
        "size": [16, 16, 2]
      },   
      "minecraft:selection_box": {
        "origin": [-8, 0, -4],
        "size": [16, 16, 8]
      },   
      "minecraft:destructible_by_mining":{
        "seconds_to_destroy": 1
      },
      "minecraft:destructible_by_explosion": false,
      "minecraft:light_dampening": 0,
      "minecraft:liquid_detection": {
        "detection_rules": [
          {
            "can_contain_liquid": true
          }
        ]
      },
      "minecraft:custom_components": [
        "drz:vertical", "drz:garage"
      ]
    }
  }
}