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

    const id_prefix = 'eidolon:kubejs/worktable';

    const recipes = [
      {
        core: [
            ' a ',
            'bcb',
            ' b '
        ],
        extras: ['d','ee','f'],
        key: {
          a: {
            item: 'minecraft:smooth_stone'
          },
          b: {
            tag: 'forge:stone'
          },
          c: {
            item: 'naturesaura:token_fear'
          },
          d: {
            item: 'eidolon:gold_inlay'
          },
          e: {
            item: 'emendatusenigmatica:nickel_crystal'
          },
          f: {
            item: 'eidolon:unholy_symbol'
          }
        },
        result: 'eidolon:unholy_effigy',
        id: 'eidolon:unholy_effigy'
      },
      {
        core: [
            'aba',
            'bcb',
            'aba'
        ],
        extras: ['f','ee','d'],
        key: {
          a: {
            item: 'minecraft:blue_wool'
          },
          b: {
            item: 'farmersdelight:canvas'
          },
          c: {
            item: 'eidolon:shadow_gem'
          },
          d: {
            item: 'tconstruct:slimesteel_reinforcement'
          },
          e: {
            item: 'emendatusenigmatica:cobalt_crystal'
          },
          f: {
            item: 'eidolon:unholy_symbol'
          }
        },
        result: '4x eidolon:wicked_weave',
        id: 'eidolon:wicked_weave'
      },
      {
        core: [
            'aba',
            'bcb',
            'aba'
        ],
        extras: ['d','ee','d'],
        key: {
          a: {
            item: 'naturesaura:tainted_gold_block'
          },
          b: {
            item: 'bloodmagic:blankslate'
          },
          c: {
            item: 'apotheosis:enchantment_library'
          },
          d: {
            item: 'eidolon:shadow_gem'
          },
          e: {
            item: 'eidolon:gold_inlay'
          }
        },
        result: 'eidolon:soul_enchanter',
        id: 'eidolon:soul_enchanter'
      },
      {
        core: [
          'aba',
          'bcb',
          'aba'
        ],
        extras: ['e','ee','e'],
        key: {
          a: {
            item: 'tconstruct:seared_brick'
          },
          b: {
            item: 'eidolon:gold_inlay'
          },
          c: {
            item: 'tconstruct:seared_melter'
          },
          e: {
            item: 'jaept:holy_ingot'
          }
        },
        result: 'tconstruct:smeltery_controller',
        id: `${id_prefix}/meltery_controller`
      },
      {
        core: [
          'aba',
          'bab',
          'aba'
        ],
        extras: ['e','ee','e'],
        key: {
          a: {
            item: 'tconstruct:scorched_bricks'
          },
          b: {
            item: 'tconstruct:hepatizon_ingot'
          },
          e: {
            item: 'jaept:dark_dough'
          }
        },
        result: 'tconstruct:foundry_controller',
        id: `${id_prefix}/foundry_controller`
      },
      {
        core: [
            'aba',
            'cde',
            'aba'
        ],
        extras: ['f','ff','f'],
        key: {
          a: {
            item: 'minecraft:prismarine_bricks'
          },
          b: {
            item: 'naturesaura:infused_iron'
          },
          c: {
            item: 'eidolon:wicked_weave'
          },
          d: {
            tag: 'forge:bookshelves'
          },
          e: {
            item: 'jaept:dark_dough'
          },
          f: {
            item: 'eidolon:enchanted_ash'
          }
        },
        result: 'apotheosis:seashelf',
        id: `${id_prefix}/seashelf`
      },
      {
        core: [
            'cbc',
            'bcb',
            'cbc'
        ],
        extras: ['e','ee','e'],
        key: {
          b: {
            item: 'eidolon:pewter_ingot'
          },
          c: {
            item: 'minecraft:andesite'
          },
          e: {
            item: 'eidolon:enchanted_ash'
          }
        },
        result: '2x create:andesite_alloy',
        id: `${id_prefix}/andesite_alloy`
      },
      {
        core: [
          'aba',
          'bcb',
          'aba'
        ],
        extras: ['e','ee','e'],
        key: {
          a: {
            item: 'emendatusenigmatica:cast_iron_plate'
          },
          c: {
            item: 'tconstruct:seared_basin'
          },
          b: {
            item: 'create:andesite_alloy'
          },
          e: {
            item: 'minecraft:item_frame'
          }
        },
        result: 'create:basin',
        id: `${id_prefix}/basin`
      },
      {
        core: [
          'bcb',
          'bab',
          'bcb'
        ],
        extras: ['e','gf',' '],
        key: {
          a: {
            item: 'create:electron_tube'
          },
          c: {
            item: 'create:shaft'
          },
          b: {
            item: 'create:andesite_casing'
          },
          g: {
            item: 'create:piston_extension_pole'
          },
          f: {
            item: 'create:brass_hand'
          },
          e: {
            item: 'minecraft:item_frame'
          }
        },
        result: 'create:deployer',
        id: `${id_prefix}/deployer`
      },
      {
        core: [
          'bbb',
          'ccc',
          'bbb'
        ],
        extras: [' ','fe',' '],
        key: {
          f:{
            item: 'create:encased_chain_drive'
          },
          c: {
            item: 'create:propeller'
          },
          b: {
            item: 'create:andesite_casing'
          },
          e: {
            item: 'quark:grate'
          }
        },
        result: 'create:encased_fan',
        id: `${id_prefix}/encased_fan`
      },
      {
        core: [
          'bba',
          'ccc',
          'bba'
        ],
        extras: [' ',' f',' '],
        key: {
          c: {
            item: 'create:shaft'
          },
          b: {
            item: 'create:andesite_casing'
          },
          a: {
            item: 'create:andesite_alloy'
          },
          f: {
            item: 'immersiveengineering:drillhead_iron'
          }
        },
        result: 'create:mechanical_drill',
        id: `${id_prefix}/mechanical_drill`
      },
      {
        core: [
          'aaa',
          'aba',
          'aaa'
        ],
        extras: ['c','dc','c'],
        key: {
          b: {
            item: 'create:shaft'
          },
          d: {
            item: 'create:andesite_casing'
          },
          a: {
            item: 'createaddition:iron_wire'
          },
          c: {
            item: 'emendatusenigmatica:cast_iron_rod'
          }
        },
        result: 'create:mechanical_harvester',
        id: `${id_prefix}/mechanical_harvester`
      },
      {
        core: [
          'bbb',
          'ccc',
          'bbb'
        ],
        extras: ['e','  ','f'],
        key: {
          c: {
            item: 'create:cogwheel'
          },
          b: {
            item: 'create:andesite_casing'
          },
          e: {
            item: 'create:piston_extension_pole'
          },
          f: {
            item: 'create:whisk'
          }
        },
        result: 'create:mechanical_mixer',
        id: `${id_prefix}/mechanical_mixer`
      },
      {
        core: [
          'bbb',
          'aca',
          'bbb'
        ],
        extras: ['e','  ','f'],
        key: {
          a: {
            item: 'create:cogwheel'
          },
          c: {
            item: 'create:shaft'
          },
          b: {
            item: 'create:andesite_casing'
          },
          e: {
            item: 'create:piston_extension_pole'
          },
          f: {
            item: 'kubejs:punch'
          }
        },
        result: 'create:mechanical_press',
        id: `${id_prefix}/mechanical_press`
      },
      {
        core: [
          'bbb',
          'cec',
          'bbb'
        ],
        extras: [' ',' f','g'],
        key: {
          c: {
            item: 'create:shaft'
          },
          b: {
            item: 'create:andesite_casing'
          },
          e: {
            item: 'create:gearbox'
          },
          f: {
            item: 'immersiveengineering:sawblade'
          },
          g: {
            item: 'minecraft:item_frame'
          }
        },
        result: 'create:mechanical_saw',
        id: `${id_prefix}/mechanical_saw`
      },
      {
        core: [
          'dcd',
          'cac',
          'bbb'
        ],
        extras: ['e','  ','f'],
        key: {
          a:{
            item: 'create:cogwheel'
          },
          c: {
            item: 'create:andesite_alloy'
          },
          b: {
            item: 'create:andesite_casing'
          },
          d: {
            item: 'emendatusenigmatica:iron_plate'
          },
          e: {
            item: 'minecraft:hopper'
          },
          f: {
            item: 'create:shaft'
          }
        },
        result: 'create:millstone',
        id: `${id_prefix}/millstone`
      },
      {
        core: [
          'beb',
          'dgd',
          'dcd'
        ],
        extras: ['a','ff',' '],
        key: {
          a:{
            tag: 'forge:slimeballs'
          },
          c: {
            item: 'create:adjustable_chain_gearshift'
          },
          b: {
            item: 'create:andesite_casing'
          },
          d: {
            item: 'appliedenergistics2:sky_stone_block'
          },
          e: {
            item: 'create:turntable'
          },
          f: {
            item: 'naturesaura:sky_ingot'
          },
          g: {
            item: 'jaept:dark_dough'
          }
        },
        result: 'create:windmill_bearing',
        id: `${id_prefix}/windmill_bearing`
      },
      {
        core: [
          'heh',
          'bgb',
          'hdh'
        ],
        extras: ['a','ff',' '],
        key: {
          a:{
            tag: 'forge:slimeballs'
          },
          b: {
            item: 'create:andesite_casing'
          },
          d: {
            item: 'create:encased_chain_drive'
          },
          e: {
            item: 'create:turntable'
          },
          f: {
            item: 'emendatusenigmatica:brass_plate'
          },
          g: {
            item: 'jaept:dark_dough'
          },
          h: {
            item: 'appliedenergistics2:sky_stone_block'
          }
        },
        result: 'create:mechanical_bearing',
        id: `${id_prefix}/mechanical_bearing`
      },
      {
        core: [
          'heh',
          'bgb',
          'd d'
        ],
        extras: ['a','ff',' '],
        key: {
          a:{
            tag: 'forge:slimeballs'
          },
          b: {
            item: 'create:andesite_casing'
          },
          d: {
            item: 'create:metal_bracket'
          },
          e: {
            item: 'appliedenergistics2:sky_stone_slab'
          },
          f: {
            item: 'emendatusenigmatica:redstone_crystal'
          },
          g: {
            item: 'jaept:dark_dough'
          },
          h: {
            item: 'emendatusenigmatica:invar_rod'
          }
        },
        result: 'create:cart_assembler',
        id: `${id_prefix}/cart_assembler`
      },
      {
        core: [
          'heh',
          'bgb',
          'bdb'
        ],
        extras: ['a','ff',' '],
        key: {
          a:{
            tag: 'forge:slimeballs'
          },
          b: {
            item: 'create:brass_casing'
          },
          d: {
            item: 'create:encased_chain_drive'
          },
          e: {
            item: 'create:turntable'
          },
          f: {
            item: 'create:electron_tube'
          },
          g: {
            item: 'jaept:dark_dough'
          },
          h: {
            item: 'appliedenergistics2:sky_stone_block'
          }
        },
        result: 'create:clockwork_bearing',
        id: `${id_prefix}/clockwork_bearing`
      },
      {
        core: [
            'cac',
            'bdb',
            'cbc'
        ],
        extras: ['e','fg','h'],
        key: {
          c: {
            item: 'kubejs:andesite_alloy_block'
          },
          a: Item.of('tconstruct:large_plate', '{Material:"tconstruct:queens_slime"}').toJson(),
          b: {
            item: 'create:andesite_casing'
          },
          d: {
            item: 'eidolon:stone_altar'
          },
          e: {
            item: 'naturesaura:token_joy'
          },
          f: {
            item: 'naturesaura:token_fear'
          },
          g: {
            item: 'naturesaura:token_anger'
          },
          h: {
            item: 'naturesaura:token_sorrow'
          }
        },
        result: 'naturesaura:nature_altar',
        id: `${id_prefix}/nature_altar`
      },
      {
        core: [
            'ada',
            'dbd',
            'ada'
        ],
        extras: ['c','cc','c'],
        key: {
          a: {
            item: 'minecraft:stone_bricks'
          },
          b: {
            item: 'kubejs:andesite_alloy_block'
          },
          c: {
            item: 'naturesaura:gold_fiber'
          },
          d: Item.of('naturesaura:effect_powder', '{effect:"naturesaura:plant_boost"}').toJson()
        },
        result: '4x naturesaura:gold_brick',
        id: `${id_prefix}/gold_brick`
      },
      {
        core: [
            'ada',
            'dbd',
            'ada'
        ],
        extras: ['c','cc','c'],
        key: {
          a: {
            item: 'minecraft:nether_bricks'
          },
          b: {
            item: 'eidolon:arcane_gold_block'
          },
          c: {
            item: 'naturesaura:gold_fiber'
          },
          d: Item.of('naturesaura:effect_powder', '{effect:"naturesaura:nether_grass"}').toJson()
        },
        result: '4x naturesaura:gold_nether_brick',
        id: `${id_prefix}/gold_nether_brick`
      },
      {
        core: [
            'ada',
            'cbc',
            'aea'
        ],
        extras: ['f','  ','g'],
        key: {
          a: {
            item: 'minecraft:nether_brick'
          },
          b: {
            item: 'alexsmobs:soul_heart'
          },
          c: {
            item: 'minecraft:iron_bars'
          },
          d: {
            item: 'jaept:dark_dough'
          },
          e: {
            item: 'naturesaura:tainted_gold_block'
          },
          f: {
            item: 'naturesaura:infused_iron'
          },
          g: {
            item: 'naturesaura:token_sorrow'
          }
        },
        result: 'naturesaura:animal_generator',
        id: `${id_prefix}/animal_generator`
      },
      {
        core: [
            'ada',
            'cbc',
            'aea'
        ],
        extras: ['f','  ','g'],
        key: {
          a: {
            tag: 'tconstruct:slime_block'
          },
          b: {
            item: 'create:mechanical_saw'
          },
          c: {
            item: 'eidolon:polished_planks_fence'
          },
          d: {
            item: 'jaept:dark_dough'
          },
          e: {
            item: 'naturesaura:infused_iron_block'
          },
          f: {
            item: 'naturesaura:infused_iron'
          },
          g: {
            item: 'naturesaura:token_sorrow'
          }
        },
        result: 'naturesaura:slime_split_generator',
        id: `${id_prefix}/slime_split_generator`
      },
      {
        core: [
            'aba',
            'cac',
            'ddd'
        ],
        extras: ['e','fg','h'],
        key: {
          a: {
            item: 'naturesaura:infused_stone'
          },
          b: {
            item: 'create:depot'
          },
          c: {
            tag: 'forge:plates/holy'
          },
          d: {
            tag: 'minecraft:planks'
          },
          e: {
            item: 'naturesaura:infused_iron_block'
          },
          f: {
            item: 'naturesaura:token_joy'
          },
          g: {
            item: 'naturesaura:token_sorrow'
          },
          h: {
            item: 'create:wooden_bracket'
          }
        },
        result: 'naturesaura:offering_table',
        id: `${id_prefix}/offering_table`
      },
      {
        core: [
            'aba',
            'aca',
            'aba'
        ],
        extras: ['d','ff','g'],
        key: {
          a: {
            item: 'tconstruct:obsidian_pane'
          },
          b: {
            tag: 'integrateddynamics:menril_logs'
          },
          c: {
            item: 'create:fluid_tank'
          },
          d: {
            item: 'kubejs:punch'
          },
          f: {
            item: 'jaept:dark_dough'
          },
          g: {
            item: 'minecraft:hopper'
          }
        },
        result: 'integrateddynamics:squeezer',
        id: `${id_prefix}/squeezer`
      },
      {
        core: [
            'aba',
            'cdc',
            'aba'
        ],
        extras: ['e','ee','e'],
        key: {
          a: {
            tag: 'integrateddynamics:menril_logs'
          },
          b: {
            item: 'minecraft:sponge'
          },
          c: {
            item: 'create:mechanical_pump'
          },
          d: {
            item: 'tconstruct:scorched_basin'
          },
          e: {
            item: 'emendatusenigmatica:cast_iron_rod'
          }
        },
        result: 'integrateddynamics:drying_basin',
        id: `${id_prefix}/drying_basin`
      }
    ];

    recipes.forEach(recipe => {
        recipe.type = 'eidolon:worktable';
        recipe.result = Item.of(recipe.result).toResultJson();
        event.custom(recipe).id(`${recipe.id}`);
    });

    recipes.forEach(recipe => {
      let output = recipe.result;
      let key = recipe.key;
      let pattern = [
        '  '+recipe.extras[0]+'  ',
        ' '+recipe.core[0]+' ',
        recipe.extras[1].charAt(0)+recipe.core[1]+recipe.extras[1].charAt(1),
        ' '+recipe.core[2]+' ',
        '  '+recipe.extras[2]+'  '
      ];
      let id = recipe.id.substring(1+(recipe.id.includes('/')? recipe.id.lastIndexOf('/') : recipe.id.indexOf(':')));
      event.recipes.create.mechanical_crafting(output, pattern, key).id('create:kubejs/mechanical_crafting/'+id);
    });

    
})