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

    const id_prefix = 'immersiveengineering:kubejs/blueprint'

    var recipes = [
        {
            inputs: [
                { count: 2, base_ingredient: { item: 'emendatusenigmatica:iron_plate' } },
                { item: 'create:metal_bracket' }
            ],
            category: 'components',
            output: {
                item: 'immersiveengineering:component_iron'
            },
            id: 'immersiveengineering:blueprint/component_iron'
        },
        {
            inputs: [
                { count: 2, base_ingredient: { item: 'emendatusenigmatica:steel_plate' } },
                { item: 'create:metal_bracket' }
            ],
            category: 'components',
            output: {
                item: 'immersiveengineering:component_steel'
            },
            id: 'immersiveengineering:blueprint/component_steel'
        },
        {
            inputs: [
                { item: 'atum:light_gray_stained_crystal_glass_pane' },
                { item: 'emendatusenigmatica:nickel_plate' },
                { item: 'immersiveengineering:wire_copper' },
                { item: 'minecraft:redstone' }
            ],
            category: 'components',
            output: {
                item: 'immersiveengineering:electron_tube'
            },
            id: 'immersiveengineering:blueprint/electron_tube'
        },
        {
            inputs: [
                { item: 'engineersdecor:halfslab_treated_wood' },
                { item: 'appliedenergistics2:purified_nether_quartz_crystal' },
                { item: 'immersiveengineering:wire_electrum' },
                { item: 'minecraft:redstone' }
            ],
            category: 'components',
            output: {
                item: 'immersiveengineering:circuit_board'
            },
            id: 'immersiveengineering:blueprint/circuit_board'
        },
        {
            inputs: [
                { count: 2, base_ingredient: { item: 'emendatusenigmatica:steel_rod' } },
                { item: 'jaept:dark_dough' }
            ],
            category: 'components',
            output: {
                item: 'engineersdecor:metal_bar',
                count: 2
            },
            id: `${id_prefix}/metal_bar`
        },
        {
            inputs: [
                { item: 'tconstruct:blank_cast' },
                { count: 2, base_ingredient: { item: 'bloodmagic:destructivecrystal' } },
                { count: 1, base_ingredient: { tag: 'pedestals:linkingtool' } },
            ],
            category: 'components',
            output: {
                item: 'pedestals:coin/default'
            },
            id: `${id_prefix}/pedestal_upgrade_default`
        },
        {
            inputs: [
                { count: 3, base_ingredient: { item: 'emendatusenigmatica:steel_plate' } },
                { item: 'immersiveengineering:wirecutter' }
            ],
            category: 'molds',
            output: {
                item: 'kubejs:mold_large_plate'
            },
            id: `${id_prefix}/mold_large_plate`
        },
        {
            inputs: [
                { count: 3, base_ingredient: { tag: 'forge:plates/fluix_steel' } },
                { item: 'appliedenergistics2:singularity'},
                { base_ingredient: { tag: 'appliedenergistics2:knife' } }
            ],
            category: 'molds',
            output: {
                item: 'lazierae2:universal_press'
            },
            id: `${id_prefix}/universal_press`
        }
    ];

    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: `${id_prefix}/${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(recipe.id)
    });

});
