ServerEvents.recipes(event => {
    event.remove({id: 'extendedcrafting:redstone_ingot'})
    event.remove({id: 'extendedcrafting:black_iron_ingot'})
    event.remove({id: 'extendedcrafting:ender_ingot'})
    event.remove({id: 'extendedcrafting:luminessence'})
    event.remove({id: 'extendedcrafting:black_iron_slate'})
    event.remove({id: 'extendedcrafting:basic_component'})
    event.remove({id: 'extendedcrafting:advanced_component'})
    event.remove({id: 'extendedcrafting:elite_component'})
    event.remove({id: 'extendedcrafting:ultimate_component'})
    event.remove({id: 'extendedcrafting:compressor'})
    event.remove({id: 'extendedcrafting:handheld_table'})
    event.remove({id: 'extendedcrafting:epic_table'})
  })

ServerEvents.recipes(event => {
  //Redstone Ingot -Induction Smelter
  event.custom({
      "type": "thermal:smelter",
      "ingredients": [
        {
          "value": [
            {"tag": "forge:dusts/redstone"}
          ],
          "count": 5
        },
        {
          "value": [
            {"tag": "forge:ingots/rose_gold"}
          ],
          "count": 2
        }
      ],
      "result": [
        {
          "item": "extendedcrafting:redstone_ingot",
          "count": 1
        }
      ],
      "energy": 4000
    }).id('extendedcrafting:redstone_ingot')
  
  //Flux Alternator - Gold -> Tainted Gold
  event.replaceInput(
    { id: 'extendedcrafting:flux_alternator' }, // Arg 1: the filter
    'minecraft:gold_ingot',            // Arg 2: the item to replace
    'naturesaura:tainted_gold'         // Arg 3: the item to replace it with
  )
  
  //Flux Crafter - Gold -> Tainted Gold
  event.replaceInput(
    { id: 'extendedcrafting:flux_crafter' }, // Arg 1: the filter
    'minecraft:gold_ingot',            // Arg 2: the item to replace
    'naturesaura:tainted_gold'         // Arg 3: the item to replace it with
  )

  //Redstone Ingot - Alloy Smelter
  event.custom({
    "type": "enderio:alloy_smelting",
    "energy": 6400,
    "experience": 0.3,
    "inputs": [
      {
        "count": 2,
        "ingredient": {
          "tag": "forge:ingots/rose_gold"
        }
      },
      {
        "count": 5,
        "ingredient": {
          "tag": "forge:dusts/redstone"
        }
      }
    ],
    "result": {
      "count": 1,
      "tag": "forge:ingots/redstone_ingot"
    }
  })
      
  //Ender Ingot
  event.custom({
    "type": "thermal:smelter",
    "ingredients": [
      {
        "value": [
          {"item": "minecraft:dragon_breath"}
        ],
        "count": 1
      },
      {
        "value": [
          {"tag": "forge:ingots/terrasteel"}
        ],
        "count": 1
      }
    ],
    "result": [
      {
        "item": "extendedcrafting:ender_ingot",
        "count": 1
      }
    ],
    "energy": 4000
  }).id('extendedcrafting:ender_ingot')
    
  //Black Iron Ingot
  event.custom({
    "type": "thermal:smelter",
    "ingredients": [
      {
        "value": [
          {"item": "createdeco:industrial_iron_ingot"}
        ],
        "count": 1
      },
      {
        "value": [
          {"tag": "forge:ingots/hop_graphite"}
        ],
        "count": 1
      },
      {
        "value": [
          {"tag": "forge:ingots/compressed_iron"}
        ],
        "count": 1
      }
    ],
    "result": [
      {
        "item": "extendedcrafting:black_iron_ingot",
        "count": 1
      }
    ],
    "energy": 4000
  }).id('extendedcrafting:black_iron_ingot')
  
  //Luminessence
  event.custom({
    "type": "create:filling",
    "ingredients": [
      {
        "item": "mysticalagriculture:tertium_essence"
      },
      {
        "fluid": "thermal:glowstone",
        "nbt": {},
        "amount": 250
      }
    ],
    "results": [
      {
        "item": "extendedcrafting:luminessence"
      }
    ]
  }).id('extendedcrafting:luminessence')
  
  //Basic Component
  event.shaped('extendedcrafting:basic_component',
  ['12 ','34 ','   '], {
      1: 'extendedcrafting:black_iron_slate',
      2: 'extendedcrafting:luminessence',
      3: '#forge:ingots/stellarium',
      4: '#forge:ingots/stellarium'
  }).id('extendedcrafting:basic_component')
  
  //Advanced Component
  event.shaped('extendedcrafting:advanced_component',
  ['12 ','34 ','   '], {
      1: 'extendedcrafting:black_iron_slate',
      2: 'extendedcrafting:luminessence',
      3: '#forge:ingots/allthemodium',
      4: '#forge:ingots/allthemodium'
  }).id('extendedcrafting:advanced_component')
  
  //Elite Component
  event.shaped('extendedcrafting:elite_component',
  ['12 ','34 ','   '], {
      1: 'extendedcrafting:black_iron_slate',
      2: 'extendedcrafting:luminessence',
      3: '#forge:gems/mana_diamond',
      4: '#forge:gems/mana_diamond'
  }).id('extendedcrafting:elite_component')
  
  //Ultimate Component
  event.shaped('extendedcrafting:ultimate_component',
  ['12 ','34 ','   '], {
      1: 'extendedcrafting:black_iron_slate',
      2: 'extendedcrafting:luminessence',
      3: '#forge:ingots/gaia',
      4: '#forge:ingots/gaia'
  }).id('extendedcrafting:ultimate_component')

  //Black Iron Slate
  event.custom({
      "type": "thermal:press",
      "ingredients": [
        {
          "tag": "forge:ingots/black_iron",
          "count": 1
      }
      ],
      "result": [
        {
          "item": "extendedcrafting:black_iron_slate",
          "count": 1
        }
      ]
    }).id('extendedcrafting:black_iron_slate')

  //Quantum Compressor
  event.custom({
    "type": "extendedcrafting:shaped_table",
    "pattern": [
      "ABBBA",
      "AACAA",
      "AADAA",
      "AEFEA",
      "ABBBA"
    ],
    "key": {
      "A": {
        "item": "extendedcrafting:black_iron_block"
      },
      "B": {
        "item": "extendedcrafting:crystaltine_ingot"
      },
      "C": {
        "item": "extendedcrafting:elite_catalyst"
      },
      "D": {
        "item": "extendedcrafting:frame"
      },
      "E": {
        "item": "extendedcrafting:elite_component"
      },
      "F": {
        "item": "mekanism:ultimate_control_circuit"
      }
    },
    "result": {
      "item": "extendedcrafting:compressor"
    }
  }).id('extendedcrafting:compressor')

  //Ultimate Ingot
  event.custom({
    "type": "extendedcrafting:shapeless_table",
    "ingredients": [
      {
        "item": "minecraft:iron_ingot"
      },
      {
        "item": "minecraft:copper_ingot"
      },
      {
        "item": "minecraft:gold_ingot"
      },
      {
        "item": "minecraft:netherite_ingot"
      },
      {
        "item": "alltheores:aluminum_ingot"
      },
      {
        "item": "alltheores:lead_ingot"
      },
      {
        "item": "alltheores:nickel_ingot"
      },
      {
        "item": "alltheores:osmium_ingot"
      },
      {
        "item": "alltheores:platinum_ingot"
      },
      {
        "item": "alltheores:silver_ingot"
      },
      {
        "item": "alltheores:tin_ingot"
      },
      {
        "item": "alltheores:uranium_ingot"
      },
      {
        "item": "alltheores:zinc_ingot"
      },
      {
        "item": "alltheores:steel_ingot"
      },
      {
        "item": "alltheores:invar_ingot"
      },
      {
        "item": "alltheores:electrum_ingot"
      },
      {
        "item": "alltheores:bronze_ingot"
      },
      {
        "item": "alltheores:enderium_ingot"
      },
      {
        "item": "alltheores:lumium_ingot"
      },
      {
        "item": "alltheores:signalum_ingot"
      },
      {
        "item": "alltheores:constantan_ingot"
      },
      {
        "item": "alltheores:brass_ingot"
      },
      {
        "item": "allthemodium:allthemodium_ingot"
      },
      {
        "item": "allthemodium:vibranium_ingot"
      },
      {
        "item": "allthemodium:unobtainium_ingot"
      },
      {
        "item": "allthemodium:unobtainium_allthemodium_alloy_ingot"
      },
      {
        "item": "allthemodium:unobtainium_vibranium_alloy_ingot"
      },
      {
        "item": "allthemodium:vibranium_allthemodium_alloy_ingot"
      },
      {
        "item": "aquaculture:neptunium_ingot"
      },
      {
        "item": "blue_skies:falsite_ingot"
      },
      {
        "item": "blue_skies:ventium_ingot"
      },
      {
        "item": "blue_skies:horizonite_ingot"
      },
      {
        "item": "botania:manasteel_ingot"
      },
      {
        "item": "botania:terrasteel_ingot"
      },
      {
        "item": "botania:elementium_ingot"
      },
      {
        "item": "botania:gaia_ingot"
      },
      {
        "tag": "forge:ingots/dark_steel"
      },
      {
        "tag": "forge:ingots/end_steel"
      },
      {
        "item": "thermal_extra:twinite_ingot"
      },
      {
        "item": "elementalcraft:drenched_iron_ingot"
      },
      {
        "item": "elementalcraft:swift_alloy_ingot"
      },
      {
        "item": "elementalcraft:fireite_ingot"
      },
      {
        "item": "extendedcrafting:black_iron_ingot"
      },
      {
        "item": "extendedcrafting:redstone_ingot"
      },
      {
        "item": "extendedcrafting:enhanced_redstone_ingot"
      },
      {
        "item": "extendedcrafting:ender_ingot"
      },
      {
        "item": "extendedcrafting:enhanced_ender_ingot"
      },
      {
        "item": "extendedcrafting:crystaltine_ingot"
      },
      {
        "item": "bigreactors:cyanite_ingot"
      },
      {
        "item": "bigreactors:blutonium_ingot"
      },
      {
        "item": "bigreactors:magentite_ingot"
      },
      {
        "item": "bigreactors:ludicrite_ingot"
      },
      {
        "item": "bigreactors:ridiculite_ingot"
      },
      {
        "item": "bigreactors:inanite_ingot"
      },
      {
        "item": "forbidden_arcanus:deorum_ingot"
      },
      {
        "item": "forbidden_arcanus:obsidian_ingot"
      },
      {
        "item": "immersiveengineering:ingot_hop_graphite"
      },
      {
        "item": "industrialforegoing:pink_slime_ingot"
      },
      {
        "item": "mekanism:ingot_refined_obsidian"
      },
      {
        "item": "mekanism:ingot_refined_glowstone"
      },
      {
        "item": "mythicbotany:alfsteel_ingot"
      },
      {
        "item": "naturesaura:infused_iron"
      },
      {
        "item": "naturesaura:sky_ingot"
      },
      {
        "item": "naturesaura:tainted_gold"
      },
      {
        "item": "naturesaura:depth_ingot"
      },
      {
        "item": "occultism:iesnium_ingot"
      },
      {
        "item": "pneumaticcraft:ingot_iron_compressed"
      },
      {
        "item": "silentgear:crimson_iron_ingot"
      },
      {
        "item": "silentgear:crimson_steel_ingot"
      },
      {
        "item": "silentgear:blaze_gold_ingot"
      },
      {
        "item": "silentgear:azure_silver_ingot"
      },
      {
        "item": "silentgear:azure_electrum_ingot"
      },
      {
        "item": "silentgear:tyrian_steel_ingot"
      },
      {
        "tag": "forge:ingots/draconium_awakened"
      },
      {
        "item": "undergarden:cloggrum_ingot"
      },
      {
        "item": "undergarden:froststeel_ingot"
      },
      {
        "item": "undergarden:forgotten_ingot"
      },
      {
        "item": "thermalendergy:prismalium_ingot"
      },
      {
        "item": "thermalendergy:melodium_ingot"
      },
      {
        "item": "thermalendergy:stellarium_ingot"
      },
      {
        "item": "eidolon:arcane_gold_ingot"
      }
    ],
    "result": {
      "item": "extendedcrafting:the_ultimate_ingot"
    }
  }).id('extendedcrafting:the_ultimate_ingot')

  //Epic Crafting Table
  event.shaped('extendedcrafting:epic_table',
  ['121','343','111'], {
  1: 'extendedcrafting:the_ultimate_component',
  2: 'extendedcrafting:the_ultimate_catalyst',
  3: 'extendedcrafting:ultimate_table',
  4: 'extendedcrafting:the_ultimate_block'
  }).id('extendedcrafting:epic_table')

  });