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

    const id_prefix = 'appliedenergistics2:kubejs/inscriber';

    const recipes = [
        {
            mode: 'inscribe',
            middle: 'emendatusenigmatica:silicon_gem',
            top: 'appliedenergistics2:silicon_press',
            output: 'appliedenergistics2:printed_silicon',
            id: 'silicon_print'
        },
        {
            mode: 'inscribe',
            middle: 'jaept:dimension_ingot',
            top: 'appliedenergistics2:engineering_processor_press',
            output: 'appliedenergistics2:printed_engineering_processor',
            id: 'engineering_processor_print'
        },
        {
            mode: 'inscribe',
            middle: 'jaept:vanadium_ingot', 
            top: 'appliedenergistics2:logic_processor_press',
            output: 'appliedenergistics2:printed_logic_processor',
            id: 'logic_processor_print'
        },
        {
            mode: 'inscribe',
            middle: 'byg:pendorite_ingot',
            top: 'lazierae2:universal_press',
            output: 'lazierae2:parallel_printed',
            id: 'parallel_processor_print'
        },
        {
            mode: 'inscribe',
            middle: 'emendatusenigmatica:silicon_gem',
            top: 'lazierae2:universal_press',
            output: 'appliedenergistics2:printed_silicon',
            id: 'silicon_print_uni'
        },
        {
            mode: 'inscribe',
            middle: 'jaept:dimension_ingot', 
            top: 'lazierae2:universal_press',
            output: 'appliedenergistics2:printed_engineering_processor',
            id: 'engineering_processor_print_uni'
        },
        {
            mode: 'inscribe',
            middle: 'jaept:vanadium_ingot', 
            top: 'lazierae2:universal_press',
            output: 'appliedenergistics2:printed_logic_processor',
            id: 'logic_processor_print_uni'
        },
        {
            mode: 'inscribe',
            middle: 'appliedenergistics2:purified_certus_quartz_crystal', 
            top: 'lazierae2:universal_press',
            output: 'appliedenergistics2:printed_calculation_processor',
            id: 'calculation_processor_print_uni'
        },
        {
            mode: 'press',
            middle: 'botania:quartz_red',
            top: 'appliedenergistics2:printed_logic_processor',
            bottom: 'appliedenergistics2:printed_silicon',
            output: 'appliedenergistics2:logic_processor',
            id: 'logic_processor'
        },
        {
            mode: 'press',
            middle: 'botania:quartz_red',
            top: 'appliedenergistics2:printed_engineering_processor',
            bottom: 'appliedenergistics2:printed_silicon',
            output: 'appliedenergistics2:engineering_processor',
            id: 'engineering_processor'
        },
        {
            mode: 'press',
            middle: 'botania:quartz_red',
            top: 'lazierae2:parallel_printed',
            bottom: 'appliedenergistics2:printed_silicon',
            output: 'lazierae2:parallel_processor',
            id: 'parallel_processor'
        },
        {
            mode: 'press',
            middle: 'botania:quartz_red',
            top: 'appliedenergistics2:printed_calculation_processor',
            bottom: 'appliedenergistics2:printed_silicon',
            output: 'appliedenergistics2:calculation_processor',
            id: 'calculation_processor'
        },
        {
            mode: 'press',
            middle: 'rftoolspower:power_core1', 
            top: 'powah:capacitor_basic_large',
            bottom: 'twilightforest:carminite',
            output: 'rftoolspower:power_core2',
            id: 'power_core2'
        },
        {
            mode: 'press',
            middle: 'kubejs:empty_quartz_lavender', 
            top: 'emendatusenigmatica:fluix_dust',
            bottom: 'twilightforest:torchberries',
            output: 'botania:quartz_lavender',
            id: 'quartz_lavender'
        },
        {
            mode: 'press',
            middle: 'appliedenergistics2:basic_card', 
            top: 'botania:mana_diamond',
            bottom: 'jaept:sky_metal_ingot',
            output: 'appliedenergistics2:advanced_card',
            id: 'advanced_card'
        },
        {
            mode: 'press',
            middle: 'modularrouters:augment_core', 
            top: 'emendatusenigmatica:dimensional_dust',
            bottom: 'materialis:fairy_ingot',
            output: 'rftoolsutility:module_template',
            id: 'module_template'
        }
    ];

    disks.forEach(disk => {
        recipes.push(
            {
                mode: 'press',
                middle: 'rftoolsbase:machine_frame', 
                top: `refinedstorage:${disk}_storage_part`,
                output: `refinedstorage:${disk}_storage_block`,
                id: `${disk}_storage_block`
            }
        );
    });

    extra_disks.forEach(disk => {
        recipes.push(
            {
                mode: 'press',
                middle: 'rftoolsbase:machine_frame', 
                top: `extrastorage:storagepart_${disk}`,
                output: `extrastorage:block_${disk}`,
                id: `${disk}_storage_block`
            }
        );
    });

    recipes.forEach((recipe) => {
        let constructed_recipe = {
            type: 'appliedenergistics2:inscriber',
            mode: recipe.mode,
            result: Item.of(recipe.output).toJson(),
            ingredients: { middle: Item.of(recipe.middle).toJson() }
        };

        if(recipe.top){
            constructed_recipe.ingredients.top = Item.of(recipe.top).toJson();
        }
        if(recipe.bottom){
            constructed_recipe.ingredients.bottom = Item.of(recipe.bottom).toJson();
        }

        event.custom(constructed_recipe).id(`${id_prefix}/${recipe.id}`);
    });
});