ServerEvents.recipes(event => {
  event.remove({id: 'ars_nouveau:sourcestone'})
  event.remove({id: 'ars_nouveau:imbuement_lapis'})
  event.remove({id: 'ars_nouveau:imbuement_amethyst'})
  event.remove({id: 'ars_nouveau:imbuement_amethyst_block'})
  event.remove({id: 'ars_nouveau:enchanting_apparatus'})
})

ServerEvents.recipes(event => {
    //Reinforced Stone
    event.shaped('4x ars_nouveau:sourcestone',
    ['111','121','111'], {
      1: 'twilightforest:aurora_block', 
      2: '#forge:gems/source'
  }).id('ars_nouveau:sourcestone')

  //Gold to Energetic Alloy
  event.replaceInput(
    { mod: 'ars_nouveau' }, // Arg 1: the filter
    'minecraft:gold_ingot',            // Arg 2: the item to replace
    '#forge:ingots/energetic_alloy'         // Arg 3: the item to replace it with
  )

  event.replaceInput(
    { mod: 'ars_nouveau' }, // Arg 1: the filter
    'minecraft:gold_nugget',            // Arg 2: the item to replace
    '#forge:nuggets/energetic_alloy'         // Arg 3: the item to replace it with
  )

  event.replaceInput(
    { mod: 'ars_nouveau' }, // Arg 1: the filter
    'minecraft:gold_block',            // Arg 2: the item to replace
    '#forge:storage_blocks/energetic_alloy'         // Arg 3: the item to replace it with
  )

  //Storage Lectern
  event.replaceInput(
    { id: 'ars_nouveau:storage_lectern' }, // Arg 1: the filter
    'minecraft:lectern',            // Arg 2: the item to replace
    'prettypipes:crafting_terminal'         // Arg 3: the item to replace it with
  )

  //Source Gem
  event.recipes.ars_nouveau.imbuement(
      "aether:ambrosium_shard", // input item
      "#forge:gems/source", // output
      500, // source cost
      []
  )

  //Enchanting Apparatus
  event.custom({
      "type": "enderio:alloy_smelting",
      "energy": 32000,
      "experience": 0.3,
      "inputs": [
        {
          "count": 1,
          "ingredient": {
            "item": "kubejs:slider_soul"
          }
        },
        {
          "count": 1,
          "ingredient": {
            "item": "kubejs:valkyrie_queen_soul"
          }
        },
        {
          "count": 1,
          "ingredient": {
            "item": "kubejs:sun_spirit_soul"
          }
        }
      ],
      "result": {
        "item": "ars_nouveau:enchanting_apparatus"
      }
  }).id('ars_nouveau:enchanting_apparatus')

})