onEvent('recipes', (event) => {
    const id_prefix = 'immersiveengineering:kubejs/arc_furnace';
    var data = {
        recipes: [
            {
                input: Ingredient.of('2x emendatusenigmatica:cast_iron_ingot'),
                secondaries: ['#forge:dusts/coke'],
                outputs: ['2x emendatusenigmatica:steel_ingot'],
                id: 'steel_ingot'
            },
            {
                input: Ingredient.of('4x astralsorcery:marble_raw'),
                secondaries: ['#forge:dusts/coke'],
                outputs: ['4x astralsorcery:black_marble_raw'],
                time: 160,
                id: 'black_marble'
            },
            {
                input: Ingredient.of('3x emendatusenigmatica:tin_dust'),
                secondaries: ['emendatusenigmatica:silver_dust', '2x minecraft:glowstone_dust'],
                outputs: ['4x emendatusenigmatica:lumium_ingot'],
                time: 240,
                id: 'lumium_ingot'
            },
            {
                input: Ingredient.of('3x emendatusenigmatica:lead_dust'),
                secondaries: ['emendatusenigmatica:diamond_dust', '2x emendatusenigmatica:ender_dust'],
                outputs: ['4x emendatusenigmatica:enderium_ingot'],
                time: 240,
                id: 'enderium_ingot'
            },
            {
                input: Ingredient.of('3x emendatusenigmatica:copper_dust'),
                secondaries: ['emendatusenigmatica:silver_dust', '4x minecraft:redstone'],
                outputs: ['4x emendatusenigmatica:signalum_ingot'],
                time: 240,
                id: 'signalum_ingot'
            },
            {
                input: Ingredient.of('4x minecraft:netherite_scrap'),
                secondaries: ['atum:nebu_ingot'],
                outputs: ['minecraft:netherite_ingot'],
                id: 'netherite_ingot'
            },
            {
                input: Ingredient.of('4x emendatusenigmatica:steel_ingot'),
                secondaries: ['alexsmobs:soul_heart'],
                outputs: ['4x tconstruct:soulsteel_ingot'],
                id: 'soulsteel_ingot'
            },
            {
                input: Ingredient.of('2x immersiveengineering:dust_hop_graphite'),
                secondaries: ['occultism:iesnium_ingot'],
                outputs: ['2x immersiveengineering:ingot_hop_graphite'],
                time: 160,
                id: 'graphite_ingot'
            },
            {
                input: Ingredient.of('2x astralsorcery:stardust'),
                secondaries: ['kubejs:titanium_ingot'],
                outputs: ['2x astralsorcery:starmetal_ingot'],
                time: 160,
                id: 'starmetal_ingot'
            },
            {
                input: Ingredient.of('3x emendatusenigmatica:invar_ingot'),
                secondaries: ['kubejs:chromium_ingot'],
                outputs: [Item.of('2x kubejs:stainless_steel_ingot')],
                id: 'stainless_steel_ingot'
            },
            {
                input: Ingredient.of('2x appliedenergistics2:purified_nether_quartz_crystal'),
                secondaries: ['tconstruct:rose_gold_ingot', '2x emendatusenigmatica:cinnabar_dust'],
                outputs: ['2x create:rose_quartz'],
                id: 'rose_quartz'
            },
            {
                input: Ingredient.of('kubejs:holy_ingot'),
                secondaries: ['astralsorcery:illumination_powder'],
                outputs: ['create:refined_radiance'],
                id: 'refined_radiance'
            },
            {
                input: Ingredient.of('emendatusenigmatica:steel_ingot'),
                secondaries: ['astralsorcery:nocturnal_powder'],
                outputs: ['create:shadow_steel'],
                id: 'shadow_steel'
            },
            {
                input: Ingredient.of('atum:golden_date'),
                secondaries: [Item.of('4x atum:nebu_block')],
                outputs: ['atum:golden_date_enchanted'],
                id: 'golden_date_enchanted'
            },
            {
                input: Ingredient.of('immersivepetroleum:asphalt'),
                secondaries: ['occultism:burnt_otherstone', 'kubejs:bloodslate_dust'],
                outputs: ['compactmachines:wall'],
                id: 'compact_wall'
            },
            {
                input: Ingredient.of('kubejs:linen_leather'),
                secondaries: ['minecraft:prismarine_shard', 'minecraft:prismarine_crystals'],
                outputs: ['thermal:diving_fabric'],
                id: 'diving_fabric'
            },
            {
                input: Ingredient.of('thermal:rubber'),
                secondaries: [Item.of('2x emendatusenigmatica:sulfur_dust')],
                outputs: ['thermal:cured_rubber'],
                id: 'cured_rubber'
            },
            {
                input: Ingredient.of('botania:livingwood'),
                secondaries: ['atum:osiris_godshard', 'astralsorcery:illumination_powder'],
                outputs: ['botania:glimmering_livingwood'],
                id: 'glimmering_livingwood'
            },
            {
                input: Ingredient.of('kubejs:hop_graphite_rod'),
                secondaries: [Item.of('2x powah:dielectric_paste')],
                outputs: ['powah:dielectric_rod'],
                id: 'dielectric_rod'
            },
            {
                input: Item.of('tconstruct:large_plate', '{Material:"tconstruct:steel"}'),
                secondaries: ['kubejs:dielectric_frame'],
                outputs: ['rftoolsbase:machine_base'],
                time: 256,
                energy: 163840,
                id: 'machine_base'
            },
            {
                input: Ingredient.of('4x industrialforegoing:dryrubber'),
                secondaries: ['kubejs:vanadium_dust'],
                outputs: [Item.of('4x industrialforegoing:plastic')],
                time: 256,
                energy: 163840,
                id: 'plastic'
            },
            {
                input: Ingredient.of('kubejs:titanium_ingot'),
                secondaries: [Item.of('2x industrialforegoing:pink_slime'), 'botania:tiny_potato'],
                outputs: ['industrialforegoing:pink_slime_ingot'],
                time: 128,
                energy: 81920,
                id: 'pink_slime_ingot'
            },
            {
                input: Ingredient.of('byg:quartzite_sand'),
                secondaries: ['emendatusenigmatica:certus_quartz_dust'],
                outputs: ['appliedenergistics2:quartz_glass'],
                time: 64,
                energy: 20480,
                id: 'quartz_glass'
            },
            {
                input: Ingredient.of('botania:manasteel_ingot'),
                secondaries: [Item.of('2x emendatusenigmatica:dimensional_dust'), 'bloodmagic:dungeon_metal'],
                outputs: ['kubejs:dimension_ingot'],
                time: 128,
                energy: 81920,
                id: 'dimension_ingot'
            },
            {
                input: Ingredient.of('powah:ender_core'),
                secondaries: [Item.of('2x appliedenergistics2:purified_fluix_crystal'), Item.of('2x botania:quartz_lavender')],
                outputs: ['appliedenergistics2:fluix_pearl'],
                time: 128,
                energy: 40960,
                id: 'fluix_pearl'
            },
            {
                input: Ingredient.of('6x botania:white_pavement'),
                secondaries: [
                    Item.of('24x appliedenergistics2:yellow_paint_ball'), 
                    Ingredient.customNBT('rftoolspower:blazing_rod', (tag) => {
                        return (tag.infSteps == 0 && tag.time <= 0);
                    })
                ],
                outputs: ['6x botania:yellow_pavement'],
                time: 192,
                energy: 30720,
                id: 'yellow_pavement'
            },
            {
                input: Ingredient.of('6x botania:white_pavement'),
                secondaries: [Item.of('24x appliedenergistics2:blue_paint_ball'), 'twilightforest:alpha_fur'],
                outputs: ['6x botania:blue_pavement'],
                time: 192,
                energy: 30720,
                id: 'blue_pavement'
            }
        ]
    };

    data.recipes.forEach((recipe) => {
        const re = event.recipes.immersiveengineering
            .arc_furnace(recipe.outputs, recipe.input, recipe.secondaries)
            .id(`${id_prefix}/${recipe.id}`);

        if (recipe.time) {
            re.time(recipe.time);
        }

        if (recipe.energy) {
            re.energy(recipe.energy);
        }
    });
});
