onEvent('recipes', (event) => {

    const id_prefix = 'immersiveengineering:kubejs/blueprint'

    var recipes = [
        {
            inputs: [
                { count: 2, base_ingredient: { tag: 'forge:plates/iron' } },
                { item: 'create:metal_bracket' }
            ],
            category: 'components',
            output: {
                item: 'immersiveengineering:component_iron'
            },
            id: 'component_iron'
        },
        {
            inputs: [
                { count: 2, base_ingredient: { tag: 'forge:plates/steel' } },
                { item: 'create:metal_bracket' }
            ],
            category: 'components',
            output: {
                item: 'immersiveengineering:component_steel'
            },
            id: 'component_steel'
        },
        {
            inputs: [
                { count: 2, base_ingredient: { tag: 'forge:rods/steel' } },
                { item: 'jaept:dark_dough' }
            ],
            category: 'components',
            output: {
                item: 'engineersdecor:metal_bar'
            },
            id: 'metal_bar'
        },
        {
            inputs: [
                { item: 'tconstruct:blank_cast' },
                { count: 1, base_ingredient: { tag: 'pedestals:linkingtool' } },
            ],
            category: 'components',
            output: {
                item: 'pedestals:coin/default'
            },
            id: 'pedestal_upgrade_default'
        },
        {
            inputs: [
                { count: 3, base_ingredient: { tag: 'forge:plates/steel' } },
                { item: 'immersiveengineering:wirecutter' }
            ],
            category: 'molds',
            output: {
                item: 'kubejs:mold_large_plate'
            },
            id: 'mold_large_plate'
        }
    ];

    const press_molds = [
        'calculation_processor_press',
        'engineering_processor_press',
        'logic_processor_press',
        'silicon_press'
    ];

    press_molds.forEach((mold) => {
        recipes.push({
            inputs: [
                { count: 3, base_ingredient: { tag: 'forge:plates/stainless_steel' } },
                { base_ingredient: { tag: 'appliedenergistics2:knife' } }
            ],
            category: 'molds',
            output: {
                item: `appliedenergistics2:${mold}`
            },
            id: mold
        })
    })

    artifacts.forEach(artifact => {
        artifact.artifacts.forEach(name => {
            let build = {};
            build.type = 'immersiveengineering:blueprint';
            build.inputs = [
                { item: `atum:${artifact.godId}_godforged_block` },
                { item: 'atum:nebu_hammer' }
            ];
            build.category = 'electrode';
            build.result = { item: 'atum:'+name };

            event.custom(build).id(`${id_prefix}/${name}`);
        })
    });

    recipes.forEach((recipe) => {
        event.custom({
            type: 'immersiveengineering:blueprint',
            inputs: recipe.inputs,
            category: recipe.category,
            result: recipe.output
        }).id(`${id_prefix}/${recipe.id}`)
    });

});
