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

    const id_prefix = 'masterfulmachinery:kubejs/mechanical_artifact_assembler';
    const recipes = [
        {
            outputs: 'eidolon:mind_shielding_plate',
            inputs: [
                'minecraft:lapis_block',
                '6x emendatusenigmatica:lead_ingot',
                '2x minecraft:leather',
                'eidolon:soul_shard',
                'minecraft:quartz'
            ],
            ticks: 100,
            id: 'mind_shielding_plate'
        },
        {
            outputs: 'eidolon:cleaving_axe',
            inputs: [
                '3x eidolon:pewter_ingot',
                '2x minecraft:stick',
                'eidolon:pewter_inlay',
                'eidolon:unholy_symbol'
            ],
            ticks: 100,
            id: 'cleaving_axe'
        },
        {
            outputs: 'eidolon:reaper_scythe',
            inputs: [
                '3x eidolon:pewter_ingot',
                '2x minecraft:stick',
                '2x eidolon:soul_shard',
                'eidolon:tattered_cloth',
                'eidolon:unholy_symbol'
            ],
            ticks: 100,
            id: 'reaper_scythe'
        },
        {
            outputs: 'eidolon:soulfire_wand',
            inputs: [
                '2x eidolon:arcane_gold_ingot',
                'eidolon:shadow_gem',
                'minecraft:stick',
                'eidolon:gold_inlay',
                'eidolon:lesser_soul_gem',
                '3x minecraft:blaze_powder'
            ],
            ticks: 100,
            id: 'soulfire_wand'
        },
        {
            outputs: 'eidolon:reversal_pick',
            inputs: [
                '2x minecraft:obsidian',
                'minecraft:crying_obsidian',
                'eidolon:pewter_ingot',
                'eidolon:pewter_inlay',
                'minecraft:ender_pearl',
                '2x eidolon:soul_shard',
                'eidolon:lesser_soul_gem'
            ],
            ticks: 100,
            id: 'reversal_pick'
        },
        {
            outputs: 'eidolon:gravity_belt',
            inputs: [
                'minecraft:ender_pearl',
                '2x minecraft:feather',
                'eidolon:basic_belt',
                'eidolon:lesser_soul_gem',
                '2x eidolon:ender_calx',
                '2x eidolon:pewter_inlay'
            ],
            ticks: 100,
            id: 'gravity_belt'
        },
        {
            outputs: 'eidolon:resolute_belt',
            inputs: [
                'eidolon:gold_inlay',
                '2x eidolon:arcane_gold_ingot',
                'eidolon:basic_belt',
                'minecraft:diamond',
                'minecraft:leather',
                '2x eidolon:soul_shard',
                'eidolon:enchanted_ash'
            ],
            ticks: 100,
            id: 'resolute_belt'
        },
        {
            outputs: 'eidolon:glass_hand',
            inputs: [
                'minecraft:diamond_block',
                'eidolon:basic_amulet',
                'minecraft:glass',
                'eidolon:zombie_heart',
                '2x eidolon:lesser_soul_gem',
                'eidolon:wraith_heart'
            ],
            ticks: 100,
            id: 'glass_hand'
        },
        {
            outputs: 'eidolon:prestigious_palm',
            inputs: [
                '4x eidolon:wicked_weave',
                'eidolon:lesser_soul_gem',
                'eidolon:warped_sprouts',
                '2x eidolon:ender_calx',
                'eidolon:soul_shard'
            ],
            ticks: 100,
            id: 'prestigious_palm'
        },
        {
            outputs: 'eidolon:warded_mail',
            inputs: [
                'eidolon:lesser_soul_gem',
                '3x eidolon:enchanted_ash',
                'minecraft:iron_chestplate',
                '4x eidolon:pewter_inlay'
            ],
            ticks: 100,
            id: 'warded_mail'
        },
        {
            outputs: 'eidolon:bonechill_wand',
            inputs: [
                '2x eidolon:pewter_ingot',
                'eidolon:wraith_heart',
                'minecraft:stick',
                'eidolon:pewter_inlay',
                'eidolon:lesser_soul_gem',
                '3x minecraft:bone_meal'
            ],
            ticks: 100,
            id: 'bonechill_wand'
        },
        {
            outputs: 'eidolon:void_amulet',
            inputs: [
                'eidolon:pewter_ingot',
                '2x eidolon:pewter_inlay',
                'eidolon:basic_amulet',
                'minecraft:obsidian',
                '2x eidolon:soul_shard'
            ],
            ticks: 100,
            id: 'void_amulet'
        },
        {
            outputs: 'atum:scarab',
            inputs: [
                'kubejs:scarab_body',
                '4x kubejs:scarab_leg',
                '4x kubejs:scarab_wing',
            ],
            ticks: 200,
            id: 'scarab'
        },
        {
            outputs: 'naturesaura:eye_improved',
            inputs: [
                'naturesaura:eye',
                '4x naturesaura:sky_ingot',
                'integrateddynamics:part_world_reader'
            ],
            ticks: 200,
            id: 'eye_improved'
        },
        {
            outputs: 'bloodmagic:sacrificialdagger',
            inputs: [
                'create:shadow_steel',
                '2x emendatusenigmatica:brass_rod',
                '2x bloodmagic:reagentbinding',
                'naturesaura:token_grief'
            ],
            ticks: 200,
            id: 'sacrificialdagger'
        },
        {
            outputs: 'bloodmagic:ritualdiviner',
            inputs: [
                '2x naturesaura:ancient_stick',
                '2x eidolon:wicked_weave',
                'bloodmagic:airscribetool',
                'bloodmagic:firescribetool',
                'bloodmagic:waterscribetool',
                'bloodmagic:earthscribetool'
            ],
            ticks: 250,
            id: 'ritualdiviner'
        },
        {
            outputs: 'bloodmagic:soulsword',
            inputs: [
                'atum:limestone_sword',
                '4x bloodmagic:ingot_hellforged',
                'create:shadow_steel'
            ],
            ticks: 250,
            id: 'soul_sword'
        },
        {
            outputs: 'bloodmagic:soulscythe',
            inputs: [
                'atum:limestone_hoe',
                '4x bloodmagic:ingot_hellforged',
                'create:shadow_steel'
            ],
            ticks: 250,
            id: 'soul_scythe'
        },
        {
            outputs: 'bloodmagic:soulaxe',
            inputs: [
                'atum:limestone_axe',
                '4x bloodmagic:ingot_hellforged',
                'create:shadow_steel'
            ],
            ticks: 250,
            id: 'soul_axe'
        },
        {
            outputs: 'bloodmagic:soulpickaxe',
            inputs: [
                'atum:limestone_pickaxe',
                '4x bloodmagic:ingot_hellforged',
                'create:shadow_steel'
            ],
            ticks: 250,
            id: 'soul_pickaxe'
        },
        {
            outputs: 'bloodmagic:soulshovel',
            inputs: [
                'atum:limestone_shovel',
                '4x bloodmagic:ingot_hellforged',
                'create:shadow_steel'
            ],
            ticks: 250,
            id: 'soul_shovel'
        },
        {
            outputs: 'createaddition:diamond_grit_sandpaper',
            inputs: [
                'minecraft:paper',
                '4x emendatusenigmatica:diamond_dust',
                'bloodmagic:bow_power_anointment_l'
            ],
            ticks: 200,
            id: 'diamond_grit_sandpaper'
        },
        {
            outputs: 'createaddition:overcharged_hammer',
            inputs: [
                '2x emendatusenigmatica:cast_iron_rod',
                'jaept:dark_dough',
                '2x createaddition:overcharged_casing'
            ],
            ticks: 200,
            id: 'overcharged_hammer'
        },
        {
            outputs: 'atum:godforged_block',
            inputs: [
                '6x atum:nebu_drop',
                '4x #forge:ingots/holy',
                '3x #atum:godshards'
            ],
            ticks: 200,
            id: 'godforged_block'
        },
        {
            outputs: 'create:creative_blaze_cake',
            inputs: [
                '64x create:blaze_cake',
                '64x create:blaze_cake',
                '64x create:blaze_cake',
                '64x create:blaze_cake',
                '64x create:blaze_cake',
                '64x create:blaze_cake',
                '4x atum:ras_step',
                'naturesaura:pet_reviver',
                '8x bloodmagic:reagentsuppression'
            ],
            ticks: 1200,
            id: 'creative_blaze_cake'
        },
        {
            outputs: 'occultism:lens_frame',
            inputs: [
                '2x occultism:otherstone_frame',
                '3x emendatusenigmatica:silver_crystal'
            ],
            ticks: 200,
            id: 'lens_frame'
        },
        {
            outputs: 'occultism:storage_remote_inert',
            inputs: [
                'occultism:otherstone_tablet',
                'atum:relic_gold_ring',
                '9x immersiveengineering:component_steel'
            ],
            ticks: 200,
            id: 'storage_remote_inert'
        },
        {
            outputs: 'occultism:iesnium_pickaxe',
            inputs: [
                'occultism:iesnium_nugget',
                '2x immersiveengineering:stick_treated',
                'kubejs:linen_leather',
                '2x buildinggadgets:construction_paste',
                '3x occultism:iesnium_ingot'
            ],
            ticks: 200,
            id: 'iesnium_pickaxe'
        }
    ];

    recipes.forEach((recipe) => {
        
        var buildRecipe = {
            type: 'masterfulmachinery:machine_process',
            structureId: 'mechanical_artifact_assembler_structure',
            controllerId: 'mechanical_artifact_assembler'
        };
        
        buildRecipe.outputs = [mmItem(false, drop(recipe.outputs, ' '), parseIntD(recipe.outputs, 1))];
        buildRecipe.inputs = [];
        recipe.inputs.forEach((input) => {
            if(typeof input == 'string'){
                let id = drop(input, ' ');
                if(id[0] == '#'){
                    jsonInput = mmItem(true, id.substring(1), parseIntD(input, 1));
                }else{
                    jsonInput = mmItem(false, id, parseIntD(input, 1));
                }
            }else{
                jsonInput = { type: 'masterfulmachinery:items', data: input};
            }
            buildRecipe.inputs.push(jsonInput);
        });
        buildRecipe.ticks = recipe.ticks;
        event.custom(buildRecipe).id(`${id_prefix}/${recipe.id}`);

    });
});
