{
  "format_version": "1.20.50",
  "minecraft:block": {
    "description": {
      "identifier": "rc:smart_chute",
      "menu_category": {
        "group": "itemGroup.name.create",
        "category": "Items"
      },
      "states": {
        "rc:state": [ "default", "powered" ]
      }
    },
    "components": {
      "minecraft:selection_box": {
        "origin": [ -8, 0, -8],
        "size": [ 16, 16, 16 ]
    },
    "minecraft:collision_box": {
      "origin": [ -8, 8, -8],
      "size": [ 16, 8, 16 ]
    },
      "minecraft:material_instances": {
        "*": {
          "texture": "smart_chute",
          "render_method": "alpha_test"
        }
      },
      "minecraft:geometry": { 
         "identifier": "geometry.smart_chute"
       },
       "minecraft:queued_ticking": {
         "interval_range": [
           15,
           15
         ],
         "looping": true,
         "on_tick": {
           "event": "ticking"
         }
       },
      "minecraft:destructible_by_mining": {
        "seconds_to_destroy": 0.3
      }
    },
    "events": {
      "ticking":{
        "sequence":[
          {
        "run_command":{
          "command":[
            "scriptevent rc:smart_chute"
          ]
        }
      }
    ]
      }
    },
    "permutations": [
      {
        "condition": "query.block_state('rc:state') == 'default'",
        "components": {
          "minecraft:geometry": { 
             "identifier": "geometry.smart_chute"
           },
           "minecraft:material_instances": {
             "*": {
               "texture": "smart_chute",
               "render_method": "alpha_test"
             }
           }
        }
      },
      {
        "condition": "query.block_state('rc:state') == 'powered'",
        "components": {
          "minecraft:geometry": { 
             "identifier": "geometry.smart_chute"
           },
           "minecraft:material_instances": {
             "*": {
               "texture": "smart_chute_powered",
               "render_method": "alpha_test"
             }
           }
        }
      }
    ]
  }
}