onEvent('recipes', e => {
  e.custom({
    "type": "masterfulmachinery:machine_structure",
    "id": "thermalassembler",
    "controllerId": "thermalmachine",
    "name": "Sequential Assembler",
    "layout": [
      [
        " )() ",
        "*)))*",
        "+))),",
        "+))),",
        "*)))*",
        " )C) "
      ],
      [
        " ))) ",
        "*)))*",
        "+))),",
        "+))),",
        "*)))*",
        " ))) "
      ],
      [
        " -*- ",
        "-***-",
        "*****",
        "*****",
        "-*.*-",
        " --- "
      ],
      [
        "     ",
        "     ",
        " --- ",
        " --- ",
        "     ",
        "     "
      ]
    ],
    "legend": {
      ")": {
        "block": "kubejs:tme"
      },
      "*": {
        "block": "immersiveengineering:sheetmetal_steel"
      },
      "+": {
        "block": "masterfulmachinery:thermalmachine_thermaltank_port_fluids_input"
      },
      ",": {
        "block": "masterfulmachinery:thermalmachine_thermalitem_port_items_input"
      },
      "-": {
        "block": "immersiveengineering:slab_sheetmetal_steel"
      },
      ".": {
        "block": "masterfulmachinery:thermalmachine_thermalbank_port_energy_input"
      },
      "(": {
        "block": 'masterfulmachinery:thermalmachine_thermalitem_port_items_output'
      }
    }
  })
})

onEvent('recipes', e => {


  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:lumium_block',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 2
        }
      },

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:rf_coil',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:signalum_ingot',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:redstone',
          "count": 5
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:iron_nugget',
          "count": 4
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:cinnabar',
          "count": 2
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:oak_planks',
          "count": 8
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:reinforcedpcb',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:phytogro',
          "count": 16
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:device_soil_infuser',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'immersiveengineering:fluid_pump',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'immersiveengineering:light_engineering',
          "count": 1
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:device_water_gen',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'immersiveengineering:capacitor_hv',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:electrum_ingot',
          "count": 4
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:charge_bench',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'immersiveengineering:metal_barrel',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'mekanism:ingot_lead',
          "count": 4
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:invar_ingot',
          "count": 4
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:device_rock_gen',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:lumium_ingot',
          "count": 4
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'ironchest:diamond_chest',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'immersiveengineering:electron_tube',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:hopper',
          "count": 1
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:device_collector',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:signalum_ingot',
          "count": 4
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:lava_bucket',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'immersiveengineering:rockcutter',
          "count": 1
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:device_nullifier',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'tconstruct:crafting_station',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:oak_planks',
          "count": 4
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'immersiveengineering:toolbox',
          "count": 1
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:tinker_bench',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 200,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 250
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:bowl',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:oak_planks',
          "count": 4
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'minecraft:bucket',
          "count": 1
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:device_tree_extractor',
          "count": 1,
        }
      }
    ]
  })


  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 350,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 10000
        }
      },
      {
        "type": "masterfulmachinery:fluids",
        "data": {
          "fluid": 'thermal:resin',
          "amount": 750
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:upgrade_augment_3',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 4
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 8
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:enderium_ingot',
          "count": 8
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'kubejs:rtme',
          "count": 4,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 350,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 1000
        }
      },
      {
        "type": "masterfulmachinery:fluids",
        "data": {
          "fluid": 'thermal:resin',
          "amount": 450
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'kubejs:machineframe',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:invar_ingot',
          "count": 8
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:invar_gear',
          "count": 8
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:basalz_powder',
          "count": 2
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:upgrade_augment_1',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 350,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 1000
        }
      },
      {
        "type": "masterfulmachinery:fluids",
        "data": {
          "fluid": 'thermal:resin',
          "amount": 450
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:upgrade_augment_1',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:signalum_ingot',
          "count": 8
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:signalum_gear',
          "count": 8
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:blitz_powder',
          "count": 2
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:upgrade_augment_2',
          "count": 1,
        }
      }
    ]
  })

  e.custom({
    "type": "masterfulmachinery:machine_process",
    "structureId": "thermalassembler",
    "controllerId": "thermalmachine",
    "ticks": 350,
    "inputs": [
      {
        "type": "masterfulmachinery:energy",
        "perTick": true,
        "data": {
          "amount": 1000
        }
      },
      {
        "type": "masterfulmachinery:fluids",
        "data": {
          "fluid": 'thermal:resin',
          "amount": 450
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:upgrade_augment_2',
          "count": 1
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:redstone_servo',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:rf_coil',
          "count": 2
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:enderium_ingot',
          "count": 8
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:enderium_gear',
          "count": 8
        }
      },
      {
        "type": "masterfulmachinery:items",
        "consumeInstantly": true,
        "data": {
          "item": 'thermal:blizz_powder',
          "count": 2
        }
      }

    ],
    "outputs": [
      {
        "type": "masterfulmachinery:items",
        "data": {
          "item": 'thermal:upgrade_augment_3',
          "count": 1,
        }
      }
    ]
  })



})