{
  "format_version": "1.21.80",
  "minecraft:block": {
    "description": {
      "identifier": "drz:refrigerator_drz",
      "menu_category": {"category": "items"},
      "traits": {
        "minecraft:placement_direction": {
          "enabled_states": ["minecraft:cardinal_direction"]
        }
      },
      "states": {
        "drz:top": [false, true],
        "drz:open": [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:open')",
        "components": {
          "minecraft:selection_box": {
            "origin": [-7, 1, -7],
            "size": [14, 14, 14]
          }
        }
      },
      {
        "condition": "!q.block_state('drz:top')",
        "components": {
          "tag:cname:Fridge": {}
        }
      },
      {
        "condition": "q.block_state('drz:top')",
        "components": {
          "tag:cname:Freezer": {},
          "tag:slot_15": {}
        }
      }
    ],
    "components": {
      "tag:open:open_door.copper": {},
      "tag:close:close_door.copper": {},
      "tag:drz:refrigerator": {},
      "tag:container": {},
      "tag:decorize": {},
      "minecraft:geometry": {
        "identifier": "geometry.refrigerator_drz",
        "culling": "drz:refrigerator",
        "bone_visibility": {
          "bottom" : "!q.block_state('drz:top')",
          "bottom_in" : "!q.block_state('drz:top') && q.block_state('drz:open')",
          "close_bottom" : "!q.block_state('drz:top') && !q.block_state('drz:open')",
          "open_bottom" : "!q.block_state('drz:top') && q.block_state('drz:open')",
          "top" : "q.block_state('drz:top')",
          "top_in" : "q.block_state('drz:top')",
          "close_top" : "q.block_state('drz:top') && !q.block_state('drz:open')",
          "open_top" : "q.block_state('drz:top') && q.block_state('drz:open')"
        }
      },
      "minecraft:material_instances": {
        "*": {
          "texture": "refrigerator_drz"
        }
      },
      "minecraft:destruction_particles": {
        "texture": "refrigerator_drz"
      },
      "minecraft:item_visual": {
         "geometry": {
           "identifier":"geometry.refrigerator_drz.item"
         },
         "material_instances": {
           "*": {
            "texture": "refrigerator_drz"
          }
        }
      },
      "minecraft:collision_box": true,   
      "minecraft:selection_box": true,   
      "minecraft:destructible_by_mining":{
        "seconds_to_destroy": 1
      },
      "minecraft:destructible_by_explosion": false,
      "minecraft:light_dampening": 0,
      "minecraft:custom_components": [
        "drz:1x2", "drz:container"
      ]
    }
  }
}