
ServerEvents.recipes(event => {

    // Dynamo recipes
    event.remove({output: /thermal:dynamo*/});

    event.shaped(Item.of('thermal:dynamo_stirling'), [
        ' C ',
        'PGP',
        'SRS'
    ], {
        C: 'thermal:rf_coil',
        P: '#forge:plates/wrought_iron',
        G: '#forge:gears/wrought_iron',
        S: 'gtceu:steel_double_plate',
        R: 'gtceu:lv_machine_hull'
    });
    
    event.recipes.gtceu.assembler('gtceu:stirling_dynamo')
        .itemInputs('thermal:rf_coil', 'gtceu:wrought_iron_gear', 'gtceu:lv_machine_hull')
        .itemOutputs('thermal:dynamo_stirling')
        .inputFluids('gtceu:tin_alloy 144')
        .duration(300)
        .EUt(16);

    event.recipes.gtceu.assembler('gtceu:lapidary_dynamo')
        .itemInputs('thermal:rf_coil', 'gtceu:cobalt_brass_gear','gtceu:mv_machine_hull')
        .itemOutputs('thermal:dynamo_lapidary')
        .inputFluids('gtceu:tin_alloy 288')
        .duration(300)
        .EUt(120);

    event.recipes.gtceu.assembler('gtceu:compression_dynamo')
        .itemInputs('thermal:rf_coil', 'gtceu:bronze_gear','gtceu:hv_machine_hull')
        .itemOutputs('thermal:dynamo_compression')
        .inputFluids('gtceu:tin_alloy 432')
        .duration(300)
        .EUt(256);

    // Dynamo new fuels and fuel recipes
    event.recipes.thermal.compression_fuel('gtceu:creosote', 20000);
    event.recipes.thermal.compression_fuel('gtceu:bio_diesel', 1024000);
    event.recipes.thermal.compression_fuel('gtceu:diesel', 1920000);
    event.recipes.thermal.compression_fuel('gtceu:cetane_boosted_diesel', 2560000);
    event.recipes.thermal.compression_fuel('gtceu:gasoline', 6400000);
    event.recipes.thermal.compression_fuel('gtceu:high_octane_gasoline', 12800000);

    event.recipes.gtceu.mixer('refined_fuel')
        .inputFluids('gtceu:light_fuel 1000', 'gtceu:heavy_fuel 1000')
        .outputFluids('thermal:refined_fuel 2000')
        .duration(200)
        .EUt(32);

    event.recipes.gtceu.brewery('sunflower_oil')
        .itemInputs('16x minecraft:sunflower')
        .outputFluids('thermal_extra:sunflower_oil 500')
        .duration(400)
        .EUt(32);

    event.recipes.gtceu.mixer('crystalized_sunflower_oil')
        .itemInputs('minecraft:amethyst_shard')
        .inputFluids('thermal_extra:sunflower_oil 1000')
        .outputFluids('thermal_extra:crystallized_sunflower_oil 750')
        .duration(1200)
        .EUt(32);

    event.recipes.gtceu.distillery('sunflower_oil_refined')
        .inputFluids('thermal_extra:crystallized_sunflower_oil 1000')
        .outputFluids('thermal_extra:refined_sunflower_oil 600')
        .circuit(0)
        .duration(12000)
        .EUt(512);

    event.recipes.gtceu.distillery('sunflower_oil_seed')
        .inputFluids('thermal_extra:crystallized_sunflower_oil 1000')
        .outputFluids('gtceu:seed_oil 400')
        .circuit(1)
        .duration(12000)
        .EUt(512);

    // Dynamo upgrades
    event.remove({output: /thermal.*augment.*/});
    event.remove({output: /thermalendergy:endergy.*/});

    // Upgrade augments
    event.recipes.gtceu.assembler('upgrade_augment_1')
        .itemInputs('4x #forge:plates/invar', '2x thermal:obsidian_glass', '#forge:gears/bronze', '#forge:circuits/mv')
        .itemOutputs('thermal:upgrade_augment_1')
        .duration(600)
        .EUt(32);

    event.recipes.gtceu.assembler('upgrade_augment_2')
        .itemInputs('4x #forge:plates/electrum', '2x thermal:signalum_glass', '#forge:gears/signalum', '#forge:circuits/hv')
        .inputFluids('gtceu:redstone 500')
        .itemOutputs('thermal:upgrade_augment_2')
        .duration(600)
        .EUt(128);

    event.recipes.gtceu.assembler('upgrade_augment_3')
        .itemInputs('4x #forge:plates/lumium', '2x thermal:lumium_glass', '#forge:gears/enderium', '#forge:circuits/ev')
        .inputFluids('gtceu:glowstone 500')
        .itemOutputs('thermal:upgrade_augment_3')
        .duration(600)
        .EUt(512);

    event.recipes.gtceu.assembler('upgrade_augment_4')
        .itemInputs('4x #forge:plates/soul_infused', '2x thermal:enderium_glass', '#forge:gears/dragonsteel', '#forge:circuits/iv')
        .inputFluids('thermal:ender 500')
        .itemOutputs('thermal_extra:upgrade_augment')
        .duration(600)
        .EUt(2048);

    event.recipes.gtceu.assembly_line('upgrade_augment_5')
        .itemInputs('16x #forge:plates/dragonsteel', '4x thermal_extra:shellite_glass', '2x #forge:gears/prismalium', '#forge:circuits/luv')
        .inputFluids('thermal_extra:shellite 2304')
        .itemOutputs('thermalendergy:endergy_upgrade_1')
        .duration(1200)
        .EUt(8192);

    event.recipes.gtceu.assembly_line('upgrade_augment_6')
        .itemInputs('16x #forge:plates/prismalium', '4x thermal_extra:twinite_glass', '2x #forge:gears/melodium', '#forge:circuits/zpm')
        .inputFluids('thermal_extra:twinite 4608')
        .itemOutputs('thermalendergy:endergy_upgrade_2')
        .duration(2400)
        .EUt(32768);

    event.recipes.gtceu.assembly_line('upgrade_augment_7')
        .itemInputs('16x #forge:plates/melodium', '4x thermal_extra:dragonsteel_glass', '2x #forge:gears/stellarium', '#forge:circuits/uv')
        .inputFluids('thermal_extra:dragonsteel 9216')
        .itemOutputs('thermalendergy:endergy_upgrade_3')
        .duration(4800)
        .EUt(131072);

    // ARC augments
    event.recipes.gtceu.assembler('arc_augment_1')
        .itemInputs('2x #forge:plates/double/signalum', '2x #forge:gears/silver', 'thermal:obsidian_glass')
        .itemOutputs('thermal:dynamo_output_augment')
        .duration(2400)
        .EUt(32);

    event.recipes.gtceu.assembler('arc_augment_2')
        .itemInputs('thermal:dynamo_output_augment', '4x #forge:gears/soul_infused', '2x thermal:signalum_glass')
        .itemOutputs('thermal_extra:dynamo_output_augment_1')
        .duration(2400)
        .EUt(128);

    event.recipes.gtceu.assembler('arc_augment_3')
        .itemInputs('thermal_extra:dynamo_output_augment_1', '4x #forge:gears/enderium', '2x thermal:lumium_glass')
        .itemOutputs('thermal_extra:dynamo_output_augment_2')
        .duration(2400)
        .EUt(512);

    event.recipes.gtceu.assembler('arc_augment_4')
        .itemInputs('thermal_extra:dynamo_output_augment_2', '4x #forge:gears/shellite', '2x thermal:enderium_glass')
        .itemOutputs('thermal_extra:dynamo_output_augment_3')
        .duration(2400)
        .EUt(2048);

    event.recipes.gtceu.assembler('arc_augment_5')
        .itemInputs('thermal_extra:dynamo_output_augment_3', '4x #forge:gears/twinite', '2x thermal_extra:shellite_glass')
        .itemOutputs('thermal_extra:dynamo_output_augment_4')
        .duration(2400)
        .EUt(8192);

    event.recipes.gtceu.assembly_line('arc-augment_6')
        .itemInputs('thermal_extra:dynamo_output_augment_4', '16x #forge:gears/prismalium', '64x #forge:foils/melodium', '16x thermal_extra:dragonsteel_glass', '4x #forge:circuits/zpm')
        .inputFluids('thermal:ender 16000', 'gtceu:soldering_alloy 2304', 'gtceu:naquadria 288')
        .itemOutputs('thermalendergy:dynamo_fuel_nullifier_augment')
        .duration(18000)
        .EUt(32768);

    // MCI augments
    event.recipes.gtceu.assembler('mci_augment_1')
        .itemInputs('2x #forge:plates/double/lumium', '2x #forge:gears/lead', 'thermal:obsidian_glass')
        .itemOutputs('thermal:dynamo_fuel_augment')
        .duration(2400)
        .EUt(32);

    event.recipes.gtceu.assembler('mci_augment_2')
        .itemInputs('thermal:dynamo_fuel_augment', '4x #forge:gears/soul_infused', '2x thermal:signalum_glass')
        .itemOutputs('thermal_extra:dynamo_fuel_augment_1')
        .duration(2400)
        .EUt(128);

    event.recipes.gtceu.assembler('mci_augment_3')
        .itemInputs('thermal_extra:dynamo_fuel_augment_1', '4x #forge:gears/enderium', '2x thermal:lumium_glass')
        .itemOutputs('thermal_extra:dynamo_fuel_augment_2')
        .duration(2400)
        .EUt(512);

    event.recipes.gtceu.assembler('mci_augment_4')
        .itemInputs('thermal_extra:dynamo_fuel_augment_2', '4x #forge:gears/shellite', '2x thermal:enderium_glass')
        .itemOutputs('thermal_extra:dynamo_fuel_augment_3')
        .duration(2400)
        .EUt(2048);

    event.recipes.gtceu.assembler('mci_augment_5')
        .itemInputs('thermal_extra:dynamo_fuel_augment_3', '4x #forge:gears/twinite', '2x thermal_extra:shellite_glass')
        .itemOutputs('thermal_extra:dynamo_fuel_augment_4')
        .duration(2400)
        .EUt(8192);

    event.recipes.gtceu.assembly_line('mci-augment_6')
        .itemInputs('thermal_extra:dynamo_fuel_augment_4', '16x #forge:gears/melodium', '64x #forge:foils/prismalium', '16x thermal_extra:dragonsteel_glass', '4x #forge:circuits/zpm')
        .inputFluids('thermal:ender 16000', 'gtceu:soldering_alloy 2304', 'gtceu:naquadria 288')
        .itemOutputs('thermalendergy:dynamo_consumption_nullifier_augment')
        .duration(18000)
        .EUt(32768);
});