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
        })
    })

    const artifacts = [
        {
            godId: 'anput',
            artifacts: [
                'anputs_grounding',
                'anputs_hunger'
            ]
        },
        {
            godId: 'anubis',
            artifacts: [
                'anubis_wrath'
            ]
        },
        {
            godId: 'atem',
            artifacts: [
                'eyes_of_atem',
                'body_of_atem',
                'legs_of_atem',
                'feet_of_atem',
                'atems_bounty',
                'atems_protection',
                'atems_homecoming',
                'atems_will'
            ]
        },
        {
            godId: 'geb',
            artifacts: [
                'gebs_might',
                'gebs_toil',
                'gebs_undoing'
            ]
        },
        {
            godId: 'horus',
            artifacts: [
                'horus_ascension',
                'horus_soaring'
            ]
        },
        {
            godId: 'isis',
            artifacts: [
                'isis_division',
                'isis_healing'
            ]
        },
        {
            godId: 'montu',
            artifacts: [
                'montus_blast',
                'montus_strike'
            ]
        },
        {
            godId: 'nepthys',
            artifacts: [
                'nepthys_banishing',
                'nepthys_guard'
            ]
        },
        {
            godId: 'nuit',
            artifacts: [
                'nuits_ire',
                'nuits_quarter',
                'nuits_vanishing'
            ]
        },
        {
            godId: 'osiris',
            artifacts: [
                'osiris_blessing',
                'osiris_mercy'
            ]
        },
        {
            godId: 'ptah',
            artifacts: [
                'ptahs_decadence'
            ]
        },
        {
            godId: 'ra',
            artifacts: [
                'halo_of_ra',
                'body_of_ra',
                'legs_of_ra',
                'feet_of_ra',
                'ras_fury',
                'ras_step'
            ]
        },
        {
            godId: 'seth',
            artifacts: [
                'seths_sting',
                'seths_venom'
            ]
        },
        {
            godId: 'shu',
            artifacts: [
                'shus_breath',
                'shus_exile',
                'shus_swiftness'
            ]
        },
        {
            godId: 'tefnut',
            artifacts: [
                'tefnuts_call',
                'tefnuts_rain'
            ]
        }
    ];

    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}`)
    });

});
