{
  "format_version": "1.20.50",
  "minecraft:block": {
    "description": {
      "identifier": "rc:furnace_engine",
      "menu_category": {
        "group": "itemGroup.name.create",
        "category": "Items"
      },
      "states": {
        "rc:lado": [ 2, 3, 4, 5 ]
      }
    },
    "components": {
      "minecraft:transformation": {
        "rotation": [0, 180, 0]
      },
      "minecraft:selection_box": {
        "origin": [ -8, 0, -8],
        "size": [ 16, 16, 16 ]
    },
    "minecraft:collision_box": {
      "origin": [ -8, 0, -8],
      "size": [ 16, 16, 16 ]
    },
      "minecraft:material_instances": {
        "*": {
          "texture": "furnace_engine",
          "render_method": "blend",
          "face_dimming": false,
          "ambient_occlusion": false
        }
      },"minecraft:on_player_placing": {
        "event": "placed",
        "target": "self"
      },
      "minecraft:geometry": { 
         "identifier": "geometry.furnace_engine"
       },
      "minecraft:destructible_by_mining": {
        "seconds_to_destroy": 0.3
      }
    },
    "events": {
  "placed": {
    "sequence":[
      {
    "set_block_state": {
      "rc:lado": "(query.cardinal_facing_2d)"
            }
          },
          {
            "run_command":{
              "command":[
                "scriptevent rc:furnace_engine"
              ]
            }
          }
        ]
      }
    },
    "permutations": [
      {
        "condition": "query.block_state('rc:lado') == 3",
        "components": {    
          "minecraft:transformation": {
            "rotation": [0, 0, 0]
          }
        }
    },
    {
        "condition": "query.block_state('rc:lado') == 5",
        "components": {    
          "minecraft:transformation": {
            "rotation": [0, 90, 0]
          }
        }
    },
    {
      "condition": "query.block_state('rc:lado') == 2",
      "components": {    
        "minecraft:transformation": {
          "rotation": [0, 180, 0]
        }
      }
  },
  {
      "condition": "query.block_state('rc:lado') == 4",
      "components": {    
        "minecraft:transformation": {
          "rotation": [0, -90, 0]
        }
      }
  }
    ]  
  }
}