ServerEvents.recipes((event) => {
    // Quartz Enriched Iron
    event.remove({ output: 'refinedstorage:quartz_enriched_iron' });

    event.recipes.create
        .mixing('4x refinedstorage:quartz_enriched_iron', [Ingredient.of('#c:ingots/iron', 3), Ingredient.of('#c:gems/quartz')])
        .heated()
        .id('refinedcreatified:create/mixing/quartz_iron');

    // Controller
    event.remove({ output: 'refinedstorage:controller' });

    event.shaped('refinedstorage:controller', [
        'QAQ',
        'SRS',
        'QSQ'
    ], {
        Q: 'refinedstorage:quartz_enriched_iron',
        A: 'refinedstorage:advanced_processor',
        S: '#c:silicon',
        R: 'storagenetwork:master',
    }).id('refinedcreatified:shapred/controller');

    // Cable
    event.remove({ output: 'refinedstorage:cable' });

    event.shaped('8x refinedstorage:cable', [
        'CCC',
        'GNG',
        'CCC'
    ], {
        C: 'refinedstorage:quartz_enriched_copper',
        G: Ingredient.of('#c:glass_blocks'),
        N: 'storagenetwork:kabel'
    }).id('refinedcreatified:shapred/cable');

    // Processors
    event.remove({ output: 'refinedstorage:raw_basic_processor' });
    event.remove({ output: 'refinedstorage:raw_improved_processor' });
    event.remove({ output: 'refinedstorage:raw_advanced_processor' });

    event.shapeless(
        'refinedstorage:raw_basic_processor',
        [
            'create:super_glue',
            Ingredient.of('#c:ingots/iron'),
            Ingredient.of('#c:silicon'),
            Ingredient.of('#c:dusts/redstone')
        ]
    )
    .damageIngredient('create:super_glue')
    .id('refinedcreatified:shapeless/incomplete_basic_processor_manual_only');


    event.shapeless(
        'refinedstorage:raw_improved_processor',
        [
            'create:super_glue',
            Ingredient.of('#c:ingots/gold'),
            Ingredient.of('#c:silicon'),
            Ingredient.of('#c:dusts/redstone')
        ]
    )
    .damageIngredient('create:super_glue')
    .id('refinedcreatified:shapeless/incomplete_improved_processor_manual_only');

    event.shapeless(
        'refinedstorage:raw_advanced_processor',
        [
            'create:super_glue',
            Ingredient.of('#c:gems/diamond'),
            Ingredient.of('#c:silicon'),
            Ingredient.of('#c:dusts/redstone')
        ]
    )
    .damageIngredient('create:super_glue')
    .id('refinedcreatified:shapeless/incomplete_advanced_processor_manual_only');
    
    // Silicon
        //crafting recipes and JEI removed in item_removing.js 
    
    // Processor binding/glue removed in item_removing.js 
});

// Silicon 
ServerEvents.tags('item', event => {
  event.remove('c:silicon', 'refinedstorage:silicon')
})