ServerEvents.recipes(event => {
    event.remove({id: 'ae2:transform/fluix_crystal'})
    event.remove({id: 'ae2:transform/fluix_crystals'})
    event.remove({id: 'ae2:transform/certus_quartz_crystals'})
    event.remove({id: 'ae2:network/crafting/cpu_crafting_unit'})
    event.remove({id: 'ae2:network/blocks/storage_drive'})
    event.remove({id: 'ae2:network/blocks/energy_energy_acceptor'})
    event.remove({id: 'ae2:network/blocks/controller'})
    event.remove({id: 'ae2:network/blocks/pattern_providers_interface'})
    event.remove({id: 'ae2:network/parts/storage_bus'})
    event.remove({id: 'ae2things:cells/disk_housing'})
    event.remove({id: 'advancedae:fluixcrystals'})
})

ServerEvents.recipes(event => {
    //Iron Ingot -> Steel Ingot
    event.replaceInput(
      { mod: 'ae2' }, // Arg 1: the filter
      'minecraft:iron_ingot',            // Arg 2: the item to replace
      'pneumaticcraft:ingot_iron_compressed'         // Arg 3: the item to replace it with
    )

    //Iron Block -> Steel Block
    event.replaceInput(
      { mod: 'ae2' }, // Arg 1: the filter
      'minecraft:iron_block',            // Arg 2: the item to replace
      'pneumaticcraft:ingot_iron_compressed_block'         // Arg 3: the item to replace it with
    )

    event.replaceInput(
      { mod: 'ae2' }, // Arg 1: the filter
      'minecraft:gold_ingot',            // Arg 2: the item to replace
      'naturesaura:tainted_gold'         // Arg 3: the item to replace it with
    )

    //Iron Block -> Steel Block
    event.replaceInput(
      { mod: 'ae2' }, // Arg 1: the filter
      'minecraft:gold_block',            // Arg 2: the item to replace
      'naturesaura:tainted_gold_block'         // Arg 3: the item to replace it with
    )

    event.replaceInput(
      { mod: 'ae2' }, // Arg 1: the filter
      'minecraft:diamond',            // Arg 2: the item to replace
      'naturesaura:sky_ingot'         // Arg 3: the item to replace it with
    )

    event.replaceInput(
      { mod: 'ae2' }, // Arg 1: the filter
      'minecraft:glass',            // Arg 2: the item to replace
      'tconstruct:clear_glass'         // Arg 3: the item to replace it with
    )

    //Crafting Unit
    event.shaped('ae2:crafting_unit',
    ['121','343','121'], {
      1: 'create:mechanical_crafter', 
      2: 'ae2:calculation_processor', 
      3: 'thermal:upgrade_augment_1', 
      4: 'thermal:machine_frame'
    }).id('ae2:crafting_unit')

    //Fluix Block
    event.custom({
      "type": "actuallyadditions:empowering",
      "base": {
        "item": "ae2:quartz_block"
      },
      "color": 6522834,
      "energy": 5000,
      "modifiers": [
        {
          "item": "minecraft:quartz_block"
        },
        {
          "item": "minecraft:redstone_block"
        },
        {
          "item": "minecraft:quartz_block"
        },
        {
          "item": "minecraft:redstone_block"
        }
      ],
      "result": {
        "item": "ae2:fluix_block"
      },
      "time": 50
    }).id('ae2:fluix_block')

    //Energy Acceptor
    event.shaped('ae2:energy_acceptor',
    ['121','232','121'], {
      1: 'pneumaticcraft:ingot_iron_compressed', 
      2: 'ae2:quartz_glass', 
      3: 'industrialforegoing:machine_frame_advanced'
    }).id('ae2:energy_acceptor')

    //ME Controller
    event.shaped('ae2:controller',
    ['121','232','121'], {
      1: 'ae2:smooth_sky_stone_block', 
      2: 'ae2:fluix_block', 
      3: 'ae2:energy_acceptor'
    }).id('ae2:controller')

    //ME Drive
    event.shaped('ae2:drive',
    ['121','131','141'], {
      1: 'pneumaticcraft:ingot_iron_compressed', 
      2: 'occultism:storage_stabilizer_tier4', 
      3: 'ae2:controller', 
      4: 'megacells:accumulation_processor'
    }).id('ae2:drive')

    //ME Drive Dupe
    event.shaped('2x ae2:drive',
    ['121','131','141'], {
      1: 'pneumaticcraft:ingot_iron_compressed', 
      2: 'ae2:drive', 
      3: 'ae2:controller', 
      4: 'megacells:accumulation_processor'
    }).id('ae2:drive_dupe')

    //ME DISK Housing
    event.shaped('ae2things:disk_housing',
    ['121','232','454'], {
      1: 'ae2:quartz_glass', 
      2: 'actuallyadditions:empowered_restonia_crystal', 
      3: 'ae2:item_cell_housing', 
      4: '#forge:ingots/netherite', 
      5: 'actuallyadditions:empowered_emeradic_crystal_block'
    }).id('ae2things:disk_housing')

    //Pattern Provider
    event.shaped('ae2:pattern_provider',
    ['121','345','121'], {
      1: 'pneumaticcraft:ingot_iron_compressed', 
      2: 'extendedcrafting:basic_table', 
      3: 'ae2:annihilation_core', 
      4: 'rftools:machine_frame', 
      5: 'ae2:formation_core'
    }).id('ae2:pattern_provider')

    //External Storage
    event.custom({
      "type": "pneumaticcraft:pressure_chamber", 
        "inputs": [
          {
            "type": "pneumaticcraft:stacked_item",
            "count": 1,
            "item": "ae2:energy_acceptor"
          },
          {
            "type": "pneumaticcraft:stacked_item",
            "count": 1,
            "item": "occultism:stable_wormhole"
          },
      ],
            "pressure": 2.5, 
            "results": [{"item": "ae2:storage_bus"}]
    }).id('ae2:storage_bus_pressure_chamber')

    //Infinity Range Booster
    event.custom({
      "type": "extendedcrafting:shaped_table",
      "pattern": [
        "ABA",
        "BCB",
        "DDD"
      ],
      "key": {
        "A": {
          "item": "industrialforegoing:range_addon11"
        },
        "B": {
          "item": "ae2:wireless_booster"
        },
        "C": {
          "item": "kubejs:artifact_star"
        },
        "D": {
          "item": "minecraft:netherite_ingot"
        }
      },
      "result": {
        "item": "aeinfinitybooster:infinity_card"
      }
    }).id('aeinfinitybooster:infinity_card')
  
    //Dimension Card
    event.custom({
      "type": "extendedcrafting:shaped_table",
      "pattern": [
        "ABA",
        "BCB",
        "ABA"
      ],
      "key": {
        "A": {
          "item": "aeinfinitybooster:infinity_card"
        },
        "B": {
          "item": "kubejs:artifact_star_animated"
        },
        "C": {
        "item": "occultism:storage_remote"
        }
      },
      "result": {
        "item": "aeinfinitybooster:dimension_card"
      }
    }).id('aeinfinitybooster:dimension_card')
})