Hi, I'm trying to wrap a custom recipe in a helper function to avoid spaghetti. The code is interpreted without any error but the function doesn't produce any recipes. I would be glad if someone could enlighten me as to why. Recipe type example: (https://github.com/BluSunrize/ImmersiveEngineering/blob/1.20.1/src/generated/resources/data/immersiveengineering/recipes/blastfurnace/steel.json)
function blastFurnace(input, output, slag, time) {
slag = slag == undefined ? 'forge:slag' : slag;
time = time == undefined ? 1200 : time;
let inputType = input[0] == '#' ? 'tag' : 'item';
let outputType = output[0] == '#' ? 'tag' : 'item';
let slagType = slag[0] == '#' ? 'tag' : 'item';
let template = {
"type": "immersiveengineering:blast_furnace",
"input": {},
"result": {},
"slag": {},
"time": time
}
template.input[inputType] = input;
template.result[outputType] = output;
template.slag[slagType] = slag;
event.custom(template)
}
blastFurnace('#forge:raw_materials/aluminum', '#forge:ingots/aluminum')
blastFurnace('minecraft:ancient_debris', 'minecraft:netherite_scrap')