ServerEvents.recipes(event => {

    event.remove({id: 'ae2:transform/certus_quartz_crystals'})
    event.remove({id: 'ae2:transform/fluix_crystals'})
    event.remove({id: 'ae2:transform/fluix_crystal'})

    event.remove({ output: 'ae2:charger' })
    event.shaped('ae2:charger', [
        'ici',
        'i  ',
        'iwi'
    ], {
        i: 'minecraft:iron_ingot',
        c: 'minecraft:copper_ingot',
        w: 'immersiveengineering:coil_lv'
    })
    event.remove({ output: 'ae2:inscriber' })
    event.shaped('ae2:inscriber', [
        'ipi',
        'cai',
        'ipi'
    ], {
        i: 'minecraft:iron_ingot',
        c: 'minecraft:copper_ingot',
        p: 'minecraft:sticky_piston',
        a: 'immersiveengineering:component_electronic_adv'
    })

    event.custom({
        "type": "thermal:crystallizer",
        "ingredients": [
          {
            "fluid": "minecraft:water",
            "amount": 2000
          },
          {
            "item": "ae2:certus_quartz_dust"
          }
        ],
        "result": [
          {
            "item": "ae2:certus_quartz_crystal"
          }
        ],
          "energy": 500
    })

    event.remove({output: 'ae2:fluix_crystal'})
    event.custom({
        "type": "thermal:crystallizer",
        "ingredients": [
          {
            "fluid": "minecraft:water",
            "amount": 2000
          },
          {
            "item": "ae2:charged_certus_quartz_crystal"
          },
          {
            "item": "ae2:sky_dust"
          }
        ],
        "result": [
          {
            "item": "ae2:fluix_crystal"
          }
        ],
        "energy": 500
    })

    event.remove({output: 'ae2:crafting_terminal'})
    event.remove({id: 'ae2:network/upgrade_wireless_crafting_terminal'})
    event.shaped('ae2:crafting_terminal', [
        'eCe', 
        'sAs',
        'eFe'  
        ],{
          A: 'enderio:skeletal_contractor', 
          C: 'ae2:terminal',
          F: 'botania:auto_crafting_halo',
          e: 'ae2:calculation_processor',
          s: 'ae2:formation_core'
    })
    
    event.remove({id: 'ae2:network/blocks/pattern_providers_interface'})
    event.shaped('ae2:pattern_provider', [
        'eCe', 
        'sAt',
        'eFe'  
        ],{
          A: 'enderio:skeletal_contractor', 
          C: 'immersiveengineering:component_electronic_adv',
          F: 'botania:auto_crafting_halo',
          e: 'ae2:blank_pattern',
          s: 'ae2:annihilation_core',
          t: 'ae2:formation_core'
    })

    event.remove({output: 'ae2:molecular_assembler'})
    event.shaped('ae2:molecular_assembler', [
        'eCe', 
        's t',
        'eFe'  
        ],{
          C: 'immersiveengineering:component_electronic_adv',
          F: 'botania:auto_crafting_halo',
          e: 'minecraft:iron_ingot',
          s: 'ae2:annihilation_core',
          t: 'ae2:formation_core'
    })

    event.remove({output: 'ae2:drive'})
    event.shaped('ae2:drive', [
        'CAC', 
        'ABA',
        'CAC'  
        ],{
          A: 'ae2:fluix_glass_cable', 
          B: 'immersiveengineering:heavy_engineering',
          C: 'ae2:chest'
    })

    event.remove({output: 'ae2:storage_bus'})
    event.shaped('ae2:storage_bus', [
        '   ', 
        'BAC',
        ' D '  
        ],{
          A: '#ae2:interface', 
          B: 'ae2:logic_processor',
          C: 'ae2:calculation_processor',
          D: 'ae2:fluix_glass_cable'
    })

	  event.replaceInput({output: 'ae2:annihilation_core'}, 'ae2:logic_processor', 'immersiveengineering:component_electronic')
  	event.replaceInput({output: 'ae2:formation_core'}, 'ae2:logic_processor', 'immersiveengineering:component_electronic')
    event.replaceInput({output: 'ae2:terminal'}, 'ae2:logic_processor', 'immersiveengineering:component_electronic_adv')
  	event.replaceInput({output: 'ae2:cell_component_1k'}, 'ae2:logic_processor', 'immersiveengineering:component_electronic')

  	event.replaceInput({output: 'ae2:cell_component_4k'}, 'ae2:calculation_processor', 'create:electron_tube')
  	event.replaceInput({output: 'ae2:cell_component_16k'}, 'ae2:calculation_processor', 'immersiveengineering:component_electronic_adv')
    event.replaceInput({output: 'ae2:cell_component_256k'}, 'ae2:calculation_processor', 'ae2:engineering_processor')

    //Disc Inscribing
    let inscribe = (top, bottom, result) => {
        event.custom({
            type: "ae2:inscriber",
            ingredients: {
                top: { item: top },
                middle: { tag: "minecraft:music_discs" },
                bottom: { item: bottom }
            },
            mode: "inscribe",
            result: {
                item: result
            }
        })
    }
    //13 from creeper
    //blocks from pyramid reality chip
    //mellohi from warden
    inscribe("minecraft:pufferfish", "minecraft:tropical_fish", "minecraft:music_disc_cat")
    inscribe("endrem:black_eye", "minecraft:map", "minecraft:music_disc_far")
    inscribe("endrem:magical_eye", "botania:quartz_elven", "minecraft:music_disc_mall")
    inscribe("create:precision_mechanism", "thermal:cured_rubber", "minecraft:music_disc_ward")
    inscribe("chimes:amethyst_chimes", "ae2:ender_dust", "minecraft:music_disc_strad")
    inscribe("create:brass_block", "supplementaries:flute", "minecraft:music_disc_stal")
    inscribe("minecraft:echo_shard", "minecraft:bone", "minecraft:music_disc_11")
    inscribe("minecraft:netherite_upgrade_smithing_template", "minecraft:gold_block", "minecraft:music_disc_pigstep")
    inscribe("minecraft:spyglass", "minecraft:brush", "minecraft:music_disc_relic")
    inscribe("neapolitan:strawberry_cake", "berry_good:sweet_berry_pips", "berry_good:music_disc_fox")
    inscribe("supplementaries:pancake", "supplementaries:antique_ink", "supplementaries:music_disc_heave_ho")
    let inscribe_specific = (top, bottom, focus, result) => {
        event.custom({
            type: "ae2:inscriber", ingredients: {
                top: { item: top }, middle: { item: focus }, bottom: { item: bottom }
            }, mode: "inscribe", result: { item: result }
        })
    }
    inscribe_specific("kubejs:sculk_clump", "minecraft:echo_shard", "minecraft:music_disc_11", "minecraft:music_disc_5")
    inscribe_specific("miners_delight:squid", "minecraft:fishing_rod", "minecraft:music_disc_cat", "minecraft:music_disc_wait")
    inscribe_specific("tiab:time_in_a_bottle", "kubejs:carpet_dust", "minecraft:music_disc_stal", "minecraft:music_disc_chirp")
    inscribe_specific("supplementaries:globe", "minecraft:grass_block", "minecraft:music_disc_relic", "minecraft:music_disc_otherside")
    inscribe_specific("createaddition:alternator", "create:steam_whistle", "minecraft:music_disc_pigstep", "eidolon:music_disc_parousia")
    
    let inscribe_trim = (top, bottom, result) => {
        event.custom({
            type: "ae2:inscriber", ingredients: {
                top: { item: top }, middle: { tag: "minecraft:trim_templates" }, bottom: { item: bottom }
            }, mode: "inscribe", result: { item: result }
        })
    }
    inscribe_trim("minecraft:terracotta", "minecraft:compass", "minecraft:wayfinder_armor_trim_smithing_template")
    inscribe_trim("minecraft:terracotta", "minecraft:brush", "minecraft:raiser_armor_trim_smithing_template")
    inscribe_trim("minecraft:terracotta", "kubejs:wallpaper_fake", "minecraft:shaper_armor_trim_smithing_template")
    inscribe_trim("minecraft:terracotta", "moyai:moyai", "minecraft:host_armor_trim_smithing_template")
    inscribe_trim("kubejs:sculk_clump", "minecraft:echo_shard", "minecraft:silence_armor_trim_smithing_template")
    inscribe_trim("minecraft:chiseled_sandstone", "minecraft:cactus", "minecraft:dune_armor_trim_smithing_template")
    inscribe_trim("minecraft:end_stone", "minecraft:ender_eye", "minecraft:eye_armor_trim_smithing_template")
    inscribe_trim("minecraft:prismarine_shard", "minecraft:prismarine_crystals", "minecraft:tide_armor_trim_smithing_template")
    inscribe_trim("minecraft:moss_block", "minecraft:vine", "minecraft:wild_armor_trim_smithing_template")
    inscribe_trim("minecraft:brain_coral_block", "minecraft:sand", "minecraft:coast_armor_trim_smithing_template")
    inscribe_trim("minecraft:purpur_block", "minecraft:chorus_fruit", "minecraft:spire_armor_trim_smithing_template")
    inscribe_trim("minecraft:gold_ingot", "minecraft:porkchop", "minecraft:snout_armor_trim_smithing_template")
    inscribe_trim("minecraft:soul_sand", "minecraft:bone", "minecraft:rib_armor_trim_smithing_template")
    inscribe_trim("supplementaries:wrench", "brewinandchewin:ham_and_cheese_sandwich", "minecraft:sentry_armor_trim_smithing_template")
    inscribe_trim("minecraft:cobbled_deepslate", "minecraft:diamond", "minecraft:ward_armor_trim_smithing_template")
    inscribe_trim("minecraft:cobblestone", "minecraft:emerald", "minecraft:vex_armor_trim_smithing_template")
    inscribe_trim("minecraft:jungle_log", "neapolitan:banana_frond", "neapolitan:primal_armor_trim_smithing_template")
})