ServerEvents.recipes(event => {
    event.remove({output: 'projecte:philosophers_stone'})
    event.remove({id: 'projecte:collector_mk1'})
    event.remove({id: 'projecte:collector_mk2'})
    event.remove({id: 'projecte:collector_mk3'})
    event.remove({id: 'projecte:relay_mk1'})
    event.remove({id: 'projecte:relay_mk2'})
    event.remove({id: 'projecte:relay_mk3'})
    event.remove({id: 'projecte:condenser_mk1'})
})

ServerEvents.recipes(event => {
    //Philosopher's Stone
    event.custom({
        "type": "extendedcrafting:shaped_table",
        "pattern": [
          "         ",
          "  ABCBA  ",
          " ADEAEDA ",
          " BEDFDEB ",
          " CAFGFAC ",
          " BEDFDEB ",
          " ADEAEDA ",
          "  ABCBA  ",
          "         "
        ],
        "key": {
          "A": {
            "item": "kubejs:perfect_rune"
          },
          "B": {
            "tag": "iceandfire:scales/dragon"
          },
          "C": {
            "item": "mysticalagradditions:creative_essence"
          },
          "D": {
            "item": "mekanism:pellet_antimatter"
          },
          "E": {
            "item": "mekanism:pellet_polonium"
          },
          "F": {
            "item": "bigreactors:insanite_ingot"
          },
          "G": {
            "item": "extendedcrafting:the_ultimate_block"
          }
        },
        "result": {
          "item": "projecte:philosophers_stone"
        }
      }).id('projecte:philosophers_stone')
    
      //Alchemical Coal
      event.replaceInput(
        { output: 'projecte:alchemical_coal' }, // Arg 1: the filter
        'minecraft:coal',            // Arg 2: the item to replace
        'mysticalagradditions:insanium_coal'         // Arg 3: the item to replace it with
      )
    
      //Watch of Flowing Time
      event.replaceInput(
        { output: 'projecte:watch_of_flowing_time' }, // Arg 1: the filter
        'projecte:dark_matter',            // Arg 2: the item to replace
        'projectexpansion:final_star'         // Arg 3: the item to replace it with
      )
    
      //Alchemical Coal -> Coal
      event.replaceOutput(
        { input: 'projecte:alchemical_coal' }, // Arg 1: the filter
        'minecraft:coal',            // Arg 2: the item to replace
        'mysticalagradditions:insanium_coal'         // Arg 3: the item to replace it with
      )

      //Energy Condenser MK1
      event.shaped('projecte:condenser_mk1',
        ['121','232','121'], {
          1: '#forge:storage_blocks/draconium', 
          2: 'rftoolsdim:legendary_essence', 
          3: 'projecte:alchemical_chest'
      }).id('projecte:condenser_mk1')

      //Transmutation Table
      event.shaped('projecte:transmutation_table',
        ['121','232','121'], {
          1: '#forge:storage_blocks/draconium_awakened', 
          2: 'projecte:condenser_mk1', 
          3: 'projecte:philosophers_stone'
      }).id('projecte:transmutation_table')
})