/*
██╗  ██╗ █████╗ ██╗   ██╗███████╗███╗   ██╗    ███╗   ███╗ ██████╗ ██████╗ ██████╗  █████╗  ██████╗██╗  ██╗███████╗
██║  ██║██╔══██╗██║   ██║██╔════╝████╗  ██║    ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██╔══██╗██╔════╝██║ ██╔╝██╔════╝
███████║███████║██║   ██║█████╗  ██╔██╗ ██║    ██╔████╔██║██║   ██║██║  ██║██████╔╝███████║██║     █████╔╝ ███████╗
██╔══██║██╔══██║╚██╗ ██╔╝██╔══╝  ██║╚██╗██║    ██║╚██╔╝██║██║   ██║██║  ██║██╔═══╝ ██╔══██║██║     ██╔═██╗ ╚════██║
██║  ██║██║  ██║ ╚████╔╝ ███████╗██║ ╚████║    ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║     ██║  ██║╚██████╗██║  ██╗███████║
╚═╝  ╚═╝╚═╝  ╚═╝  ╚═══╝  ╚══════╝╚═╝  ╚═══╝    ╚═╝     ╚═╝ ╚═════╝ ╚═════╝ ╚═╝     ╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝╚══════╝
*/
ServerEvents.recipes(e => 
{
    let addCokeOvenRecipe = (output, input, creosoteAmount, time, recipeID) => {
        e.custom({
            type: "immersiveengineering:coke_oven",
            creosote: creosoteAmount,
            input: {
                item: input
            },
            result: {
                item: output
            },
            time: time
        }).id(`haven:cokeoven/` + recipeID)
    }

    e.remove({ id: 'immersiveengineering:cokeoven/charcoal'})
    e.remove({ id: 'immersiveengineering:cokeoven/coke'})
    e.remove({ id: 'immersiveengineering:cokeoven/coke_block'})
    e.remove({ id: 'immersiveengineering:crafting/stick_steel'})
    e.remove({ id: 'immersiveengineering:crafting/plate_uranium_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_steel_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_silver_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_nickel_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_lead_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_iron_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_gold_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_electrum_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_copper_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_constantan_hammering'})
    e.remove({ id: 'immersiveengineering:crafting/plate_aluminum_hammering'})

    addCokeOvenRecipe('thermal:coal_coke', 'minecraft:charcoal', 62, 300, "coal_coke_from_charcoal")
    addCokeOvenRecipe('thermal:coal_coke', 'minecraft:coal', 250, 300, "coal_coke_from_coal")
    addCokeOvenRecipe('thermal:coal_coke_block', 'minecraft:coal_block', 2300, 2500, "coal_coke_from_coal_block")
    addCokeOvenRecipe('thermal:coal_coke_block', 'minecraft:charcoal_block', 600, 2500, "coal_coke_from_charcoal_block")
})
