// priority: 0

ServerEvents.recipes(event => {

    // Thermal Machine Recipes

    // Smelter
    event.recipes.thermal.smelter("4x thermal:signalum_ingot", ['3x #forge:ingots/copper', '4x minecraft:redstone', tin_ingot]).id("thermal:machines/smelter/smelter_alloy_signalum")
    event.recipes.thermal.smelter("2x thermal:rose_gold_ingot", ['1x #forge:ingots/electrum', '1x #forge:ingots/copper']).id("thermal:machines/smelter/smelter_alloy_rose_gold")

    event.recipes.thermal.smelter("1x extendedcrafting:basic_component", ['1x extendedcrafting:black_iron_slate', 'thermal:upgrade_augment_1', iron_gear]).id("extendedcrafting:basic_component")
    event.recipes.thermal.smelter("1x extendedcrafting:advanced_component", ['1x extendedcrafting:black_iron_slate', 'thermal:upgrade_augment_2', "extendedcrafting:luminessence"]).id("extendedcrafting:advanced_component")
    event.recipes.thermal.smelter("1x extendedcrafting:elite_component", ['1x extendedcrafting:black_iron_slate', 'thermal:upgrade_augment_3', "extendedcrafting:crystaltine_ingot"]).id("extendedcrafting:elite_component")
    event.recipes.thermal.smelter("1x extendedcrafting:ultimate_component", ['1x extendedcrafting:black_iron_slate', 'thermal_extra:upgrade_augment', 'minecraft:dragon_egg']).id("extendedcrafting:ultimate_component")
    event.recipes.thermal.smelter("1x extendedcrafting:the_ultimate_component", ['1x extendedcrafting:black_iron_slate', 'mysticalagradditions:creative_essence', "extendedcrafting:the_ultimate_nugget"]).id("extendedcrafting:the_ultimate_component")

    // Crystallizer
    event.recipes.thermal.crystallizer("minecraft:ice", [Fluid.of("minecraft:water", 2000), "thermal:blizz_powder"]).energy(3000).id("thermal:crystallizer/ice")
    event.recipes.thermal.crystallizer("ae2:certus_quartz_crystal", [Fluid.of("minecraft:water", 500), "#forge:dusts/certus_quartz"]).energy(3000).id("thermal:crystallizer/certus_quartz_crystal")
    event.recipes.thermal.crystallizer("minecraft:amethyst_shard", [Fluid.of("minecraft:water", 500), "#forge:dusts/amethyst"]).energy(5000).id("thermal:crystallizer/amethyst_shard")

    // Bottler
    event.recipes.thermal.bottler("thermal:rf_coil", [Fluid.of("thermal:redstone", 200), "submerged:coil"]).id("thermal:rf_coil")

    // Press
    event.recipes.thermal.press('extendedcrafting:black_iron_slate', '#forge:ingots/black_iron').id("extendedcrafting:black_iron_slate")
    event.recipes.thermal.press('thermal:diamond_gear', ['4x #forge:gems/diamond', 'thermal:press_gear_die']).id("submerged:diamond_gear")


    // Standard Crafting Recipes

    event.shaped(`1x thermal:machine_frame`, ['III', 'GRG', 'III'], { G: "thermal:energy_duct", R: redstone_block, I: iron_ingot }).id(`thermal:machine_frame`)
    event.shaped(`8x thermal:fluid_duct_windowed`, ['BBB', 'GRG', 'BBB'], { B: bronze_ingot, R: "thermal:energy_duct", G: glass }).id(`thermal:fluid_duct_windowed_4`)
    event.shaped(`1x thermal:emerald_dust`, [' E ', 'EDE', ' E '], { D: diamond, E: 'mysticalagriculture:prudentium_essence' }).id(`submerged:emerald_dust`)
    event.shaped(`1x thermal:wrench`, ['L L', ' L ', ' L '], { L: lead_ingot }).id(`thermal:tools/wrench`)

    event.shaped(`3x thermal:diving_fabric`, [' S ', 'SCS', ' S '], { S: "opolisutilities:leafy_string", C: "submerged:charcoal_filter" }).id(`thermal:diving_fabric`)
    event.shaped(`1x thermal:diving_helmet`, ['FFF', 'F F'], { F: "thermal:diving_fabric" }).id(`thermal:armor/diving_helmet`)
    event.shaped(`1x thermal:diving_chestplate`, ['F F', 'FFF', 'FFF'], { F: "thermal:diving_fabric" }).id(`thermal:armor/diving_chestplate`)
    event.shaped(`1x thermal:diving_leggings`, ['FFF', 'F F', 'F F'], { F: "thermal:diving_fabric" }).id(`thermal:armor/diving_leggings`)
    event.shaped(`1x thermal:diving_boots`, ['F F', 'F F'], { F: "thermal:diving_fabric" }).id(`thermal:armor/diving_boots`)

    event.blasting(`1x thermal:bronze_ingot`, `submerged:unfired_bronze`).id(`submerged:bronze_ingot`)


    // Removals

    event.remove({ id: "thermal:machines/pulverizer/pulverizer_andesite" })
    event.remove({ id: "thermal:machines/pulverizer/pulverizer_diorite" })
    event.remove({ id: "thermal:machines/pulverizer/pulverizer_granite" })
    event.remove({ id: "thermal:machines/smelter/smelter_alloy_netherite" })
    event.remove({ id: "thermal:lumium_dust_4" })
    event.remove({ id: "thermal:signalum_dust_4" })
    event.remove({ id: "thermal:enderium_dust_2" })
    event.remove({ id: "thermal:earth_charge/ender_pearl_dust_from_ender_pearl" })
    event.remove({ id: "thermal:earth_charge/quartz_from_quartz_block" })


    // Replacements

    event.replaceInput({ id: "thermal:machine_pulverizer" }, copper_gear, copper_block)
    event.replaceInput({ id: "thermal:machine_pulverizer" }, "thermal:rf_coil", redstone_block)
    event.replaceInput({ id: "thermal:machine_pulverizer" }, flint, "supplementaries:flint_block")

    event.replaceInput({ id: "thermal:machine_smelter" }, "thermal:rf_coil", redstone_block)
    event.replaceInput({ id: "thermal:machine_crucible" }, "thermal:rf_coil", "thermal:signalum_ingot")
    event.replaceInput({ id: "thermal:machine_crucible" }, "minecraft:nether_bricks", invar_block)
    event.replaceInput({ id: "thermal:machine_bottler" }, "thermal:rf_coil", "thermal:signalum_ingot")
    event.replaceInput({ id: "thermal:machine_crystallizer" }, "#thermal:glass/hardened", glass)
    event.replaceInput({ id: "thermal:machine_insolator" }, "#forge:gears/lumium", "mysticalagriculture:inferium_block")

    event.replaceInput({ id: "thermal:machine_press" }, "thermal:constantan_gear", "thermal:constantan_block")
    event.replaceInput({ id: "thermal:machine_press" }, "thermal:rf_coil", redstone_block)
    event.replaceInput({ id: "thermal:press_gear_die" }, "thermal:diamond_gear", invar_block)

})