onEvent('recipes', event => {

    //cokeoven
    function coke(input, output, amount, time){
        event.custom(
            {"type":"immersiveengineering:coke_oven","result":{"item":output},"input":{"item":input},"creosote":amount,"time":time}
        )
    }
    coke('minecraft:brick', 'minecraft:nether_brick', 25, 1000)
    coke('minecraft:bricks', 'minecraft:nether_bricks', 100, 9000)

    //blastfurnace
    function furnace(input, output1, output2, amountoutput2, time){
        event.custom(
            {"type":"immersiveengineering:blast_furnace","result":{"item":output1},"input":{"item":input},"slag":{"count":amountoutput2,"base_ingredient":{"item":output2}},"time":time}
        )
    }

    //CRUSHER
    //crusher_1output
    function crusher(input, output1, amountoutput1, RFamount){
        event.custom(
            {"type":"immersiveengineering:crusher","result":{"item":output1,"count":amountoutput1},"input":{"item":input},"energy":RFamount}
        )
    }
    //crusher_2output
    function crusher2(input, output1, amountoutput1, output2, chanceoutput2, RFamount){
        event.custom(
            {"type":"immersiveengineering:crusher","secondaries":[{"chance":chanceoutput2,"output":{"item":output2}}],"result":{"item":output1,"count":amountoutput1},"input":{"item":input},"energy":RFamount}
        )
    }
    crusher2('minecraft:bone_block', 'minecraft:bone_meal', 6, 'botania:fertilizer', 0.4, 3500)
    
    //metalpress
    function press(mold, input, output, amountoutput, RFamount){
        event.custom(
            {"type":"immersiveengineering:metal_press","mold":{"item":mold},"result":{"count":amountoutput,"base_ingredient":{"item":output}},"input":{"item":input},"energy":RFamount}
        )
    }
    press('immersiveengineering:mold_packing_9', 'immersiveengineering:storage_lead', 'immersiveengineering:sheetmetal_lead', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'immersiveengineering:storage_nickel', 'immersiveengineering:sheetmetal_nickel', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'mekanism:block_uranium', 'immersiveengineering:sheetmetal_uranium', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'immersiveengineering:storage_electrum', 'immersiveengineering:sheetmetal_electrum', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'minecraft:iron_block', 'immersiveengineering:sheetmetal_iron', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'immersiveengineering:storage_constantan', 'immersiveengineering:sheetmetal_constantan', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'immersiveengineering:storage_silver', 'immersiveengineering:sheetmetal_silver', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'minecraft:gold_block', 'immersiveengineering:sheetmetal_gold', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'mekanism:block_steel', 'immersiveengineering:sheetmetal_steel', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'immersiveengineering:storage_aluminum', 'immersiveengineering:sheetmetal_aluminum', 1, 2500)
    press('immersiveengineering:mold_packing_9', 'tconstruct:copper_block', 'immersiveengineering:sheetmetal_copper', 1, 2500)
    press('immersiveengineering:mold_unpacking', 'botania:white_mystical_flower', 'botania:white_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:orange_mystical_flower', 'botania:orange_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:magenta_mystical_flower', 'botania:magenta_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:light_blue_mystical_flower', 'botania:light_blue_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:yellow_mystical_flower', 'botania:yellow_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:lime_mystical_flower', 'botania:lime_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:pink_mystical_flower', 'botania:pink_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:gray_mystical_flower', 'botania:gray_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:light_gray_mystical_flower', 'botania:light_gray_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:cyan_mystical_flower', 'botania:cyan_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:purple_mystical_flower', 'botania:purple_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:blue_mystical_flower', 'botania:blue_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:brown_mystical_flower', 'botania:brown_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:green_mystical_flower', 'botania:green_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:red_mystical_flower', 'botania:red_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:black_mystical_flower', 'botania:black_petal', 2, 5000)
    press('immersiveengineering:mold_unpacking', 'botania:white_double_flower', 'botania:white_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:orange_double_flower', 'botania:orange_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:magenta_double_flower', 'botania:magenta_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:light_blue_double_flower', 'botania:light_blue_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:yellow_double_flower', 'botania:yellow_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:lime_double_flower', 'botania:lime_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:pink_double_flower', 'botania:pink_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:gray_double_flower', 'botania:gray_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:light_gray_double_flower', 'botania:light_gray_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:cyan_double_flower', 'botania:cyan_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:purple_double_flower', 'botania:purple_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:blue_double_flower', 'botania:blue_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:brown_double_flower', 'botania:brown_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:green_double_flower', 'botania:green_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:red_double_flower', 'botania:red_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'botania:black_double_flower', 'botania:black_petal', 4, 8000)
    press('immersiveengineering:mold_unpacking', 'minecraft:bone_block', 'minecraft:bone', 9, 1250)
    press('immersiveengineering:mold_unpacking', 'kubejs:wither_bone_block', 'tconstruct:necrotic_bone', 9, 1250)

    //sawmill
    function saw(input, output1, amountoutput1, output2, amountoutput2, RFamount){
        event.custom(
            {"type":"immersiveengineering:sawmill","secondaries":[{"output":{"item":output2,"count":amountoutput2},"stripping":false}],"result":{"item":output1,"count":amountoutput1},"input":{"item":input},"energy":RFamount}
        )
    }
    saw('mekanism:block_steel', 'immersiveengineering:steel_fence', 6, 'mekanism:nugget_steel', 3, 3500)
    saw('immersiveengineering:storage_aluminum', 'immersiveengineering:alu_fence', 6, 'immersiveengineering:nugget_aluminum', 3, 3500)

    //arc
    function arcfurnace(input, amountinput, input2, input3, output, amountoutput, time, RFamount){
        event.custom(
          {"type":"immersiveengineering:arc_furnace","results":[{"count":amountoutput,"base_ingredient":{"item":output}}],"additives":[{"item":input2}, {"tag":input3}],"input":{"count":amountinput,"base_ingredient":{"item":input}},"time":time,"energy":RFamount}
        )
    }
    arcfurnace('appliedenergistics2:calculation_processor', 1, 'botania:mana_glass', 'immersiveengineering:scaffoldings/steel', 'appliedenergistics2:molecular_assembler', 1, 300, 240000)
})