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

    const id_prefix = 'appliedenergistics2:kubejs/shaped';
    const terminals = [
        { base: 'appliedenergistics2:terminal', wireless: 'appliedenergistics2:wireless_terminal'},
        { base: 'appliedenergistics2:pattern_terminal', wireless: 'ae2wtlib:wireless_pattern_terminal'},
        { base: 'appliedenergistics2:crafting_terminal', wireless: 'ae2wtlib:wireless_crafting_terminal'},
        { base: 'appliedenergistics2:interface_terminal', wireless: 'ae2wtlib:wireless_interface_terminal'},
    ];

    const cells = [
        '1k', '4k', '16k', '64k', '1k_fluid', '4k_fluid', '16k_fluid', '64k_fluid'
    ];

    terminals.forEach(terminal => {
        event.shaped(terminal.wireless, 
            [
                'ABA',
                'CDC',
                'AEA'
            ], 
            {
                A: '#forge:plates/stainless_steel',
                B: 'appliedenergistics2:wireless_receiver',
                C: 'botania:corporea_spark',
                D: terminal.base,
                E: 'appliedenergistics2:dense_energy_cell'
            }
        ).id(`${id_prefix}/${terminal.wireless.substring(terminal.wireless.indexOf(':')+1)}`);
    })

    cells.forEach(cell => {
        var id = cell.includes('_')? `${cell.substring(cell.indexOf('_')+1)}_storage_cell_${cell.substring(0,cell.indexOf('_'))}` : `storage_cell_${cell}`;
        event.shaped(`appliedenergistics2:${cell}_storage_cell`, 
            [
                'ABA',
                'CDC',
                'ACA'
            ], 
            {
                A: 'emendatusenigmatica:steel_plate',
                B: 'appliedenergistics2:quartz_glass',
                C: 'industrialforegoing:plastic',
                D: `appliedenergistics2:${cell}_cell_component`
            }
        ).id(`appliedenergistics2:network/cells/${id}`);
    })

});