/*
██╗  ██╗ █████╗ ██╗   ██╗███████╗███╗   ██╗    ███╗   ███╗ ██████╗ ██████╗ ██████╗  █████╗  ██████╗██╗  ██╗███████╗
██║  ██║██╔══██╗██║   ██║██╔════╝████╗  ██║    ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██╔══██╗██╔════╝██║ ██╔╝██╔════╝
███████║███████║██║   ██║█████╗  ██╔██╗ ██║    ██╔████╔██║██║   ██║██║  ██║██████╔╝███████║██║     █████╔╝ ███████╗
██╔══██║██╔══██║╚██╗ ██╔╝██╔══╝  ██║╚██╗██║    ██║╚██╔╝██║██║   ██║██║  ██║██╔═══╝ ██╔══██║██║     ██╔═██╗ ╚════██║
██║  ██║██║  ██║ ╚████╔╝ ███████╗██║ ╚████║    ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║     ██║  ██║╚██████╗██║  ██╗███████║
╚═╝  ╚═╝╚═╝  ╚═╝  ╚═══╝  ╚══════╝╚═╝  ╚═══╝    ╚═╝     ╚═╝ ╚═════╝ ╚═════╝ ╚═╝     ╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝╚══════╝
*/
ServerEvents.recipes(e => {
    let igneousExtruder = (output, side, below) => {
        e.custom({
            type: "thermal:rock_gen",
            adjacent: side,
            below: below,
            result: {
              item: output
            }
          }).id(`haven:igneous_extruder/${output.replace(":", "_")}`)
    }

    e.remove({ id: 'thermalendergy:stellarium_gear'})
    e.remove({ id: 'thermalendergy:prismalium_gear'})
    e.remove({ id: 'thermalendergy:melodium_gear'})
    e.remove({ id: 'thermal:parts/tin_gear'})
    e.remove({ id: 'thermal:parts/steel_gear'})
    e.remove({ id: 'thermal:parts/silver_gear'})
    e.remove({ id: 'thermal:parts/signalum_gear'})
    e.remove({ id: 'thermal:parts/rose_gold_gear'})
    e.remove({ id: 'thermal:parts/quartz_gear'})
    e.remove({ id: 'thermal:parts/nickel_gear'})
    e.remove({ id: 'thermal:parts/netherite_gear'})
    e.remove({ id: 'thermal:parts/lumium_gear'})
    e.remove({ id: 'thermal:parts/lead_gear'})
    e.remove({ id: 'thermal:parts/iron_gear'})
    e.remove({ id: 'thermal:parts/invar_gear'})
    e.remove({ id: 'thermal:parts/gold_gear'})
    e.remove({ id: 'thermal:parts/enderium_gear'})
    e.remove({ id: 'thermal:parts/emerald_gear'})
    e.remove({ id: 'thermal:parts/electrum_gear'})
    e.remove({ id: 'thermal:parts/diamond_gear'})
    e.remove({ id: 'thermal:parts/copper_gear'})
    e.remove({ id: 'thermal:parts/constantan_gear'})
    e.remove({ id: 'thermal:parts/bronze_gear'})
    e.remove({ id: 'iron_ender_chests:netherite_ender_chest'})
    e.remove({ id: 'rftoolsbuilder:builder'})
    e.remove({ id: 'thermal:explosive_grenade_4'})
    e.remove({ id: 'thermal:fire_grenade_4'})
    e.remove({ id: 'thermal:ice_grenade_4'})
    e.remove({ id: 'thermal:lightning_grenade_4'})
    e.remove({ id: 'thermal:earth_grenade_4'})
    e.remove({ id: 'thermal:ender_grenade_4'})
    e.remove({ id: 'thermal:glowstone_grenade_4'})
    e.remove({ id: 'thermal:redstone_grenade_4'})
    e.remove({ id: 'thermal:slime_grenade_4'})
    e.remove({ id: 'thermal:diamond_gear'})

    igneousExtruder("minecraft:netherrack", "minecraft:water", "minecraft:soul_sand")

    e.recipes.thermal.press(Fluid.of('thermal:latex', 50), '#forge:slimeballs').id('haven:latex')
    e.recipes.thermal.smelter('minecraft:ender_eye', ['minecraft:ender_pearl', '2x minecraft:blaze_powder']).energy(2000).id('haven:ender_eye')
    e.replaceInput({input: 'thermal:flux_capacitor'}, 'thermal:rf_coil', 'minecraft:redstone_block')
    e.replaceInput({input: 'thermal:energy_cell_frame'}, 'thermal:electrum_gear', 'thermal:flux_capacitor')
    e.replaceInput({input: 'thermal:fluid_cell_frame'}, 'thermal:iron_gear', 'minecraft:bucket')
    e.replaceInput({input: 'thermal:press_unpacking_die'}, '#minecraft:planks', 'minecraft:magma_block')
    e.replaceInput({input: 'thermal:machine_chiller'}, 'minecraft:packed_ice', 'minecraft:water_bucket')
    e.replaceInput({input: 'thermal:machine_frame'}, 'minecraft:iron_ingot', 'minecraft:blaze_rod')
    e.replaceInput({input: 'thermal:rf_coil'}, 'minecraft:gold_ingot', 'minecraft:blaze_rod')
    e.replaceInput({input: 'thermal:machine_smelter'}, '#forge:sand', '#forge:coal_coke')
    e.replaceInput({input: 'thermal:device_tree_extractor'}, 'thermal:redstone_servo', 'thermal:rf_coil')
    e.shaped('4x thermal:diving_fabric', [' S ', 'SPS', ' S '], {S: 'minecraft:string', P:'minecraft:prismarine_crystals'}).id('thermal:diving_fabric')
    e.shaped('4x thermal:hazmat_fabric', [' S ', 'SPS', ' S '], {S: 'minecraft:string', P:'thermal:cured_rubber'}).id('thermal:hazmat_fabric')

})