onEvent('recipes', event => {

    let multiSmelt = (output, input, includeBlasting, id) => {
        event.smelting(output, input).id(`kubejs:smelting/${id}`);
        
        if (includeBlasting) {
          event.blasting(output, input).id(`kubejs:blasting/${id}`);
        }
    }

    metals.forEach(metal => {
        var crushed = itemOf(`#create:crushed_ores/${metal}`);
        var ingot = itemOf(`#forge:ingots/${metal}`);
        if(crushed!=null && ingot!=null){
            multiSmelt(ingot,crushed,true,`${metal}_ingot_from_crushed_ore`);
        }
    });

})