ServerEvents.recipes(event => {
    event.remove({id: 'powah:crafting/dielectric_paste'})
    event.remove({id: 'powah:crafting/dielectric_paste_2'})
    event.remove({id: 'powah:crafting/dielectric_casing'})
    event.remove({id: 'powah:crafting/dielectric_rod'})
    event.remove({id: 'powah:crafting/dielectric_rod_h'})
    event.remove({id: 'powah:crafting/energizing_orb'})
    event.remove({id: 'powah:energizing/energized_steel'})
    event.remove({id: 'powah:energizing/spirited_steel'})
    event.remove({id: 'powah:energizing/niotic_crystal'})
    event.remove({id: 'powah:energizing/blazing_crystal'})
    event.remove({id: 'powah:energizing/blazing_crystal_2'})
})


ServerEvents.recipes(event => {
    //Dielectric Casing
    event.custom({
        "type": "extendedcrafting:shaped_table",
        "pattern": [
          "ABA",
          "C C",
          "ABA"
        ],
        "key": {
          "A": {
            "item": "extendedcrafting:black_iron_ingot"
          },
          "B": {
            "item": "powah:dielectric_rod_horizontal"
          },
          "C": {
            "item": "powah:dielectric_rod"
          }
        },
        "result": {
          "item": "powah:dielectric_casing"
        }
      }).id('powah:crafting/dielectric_casing')
      
    //Dielectric Rod
    event.custom({
        "type": "extendedcrafting:shaped_table",
        "pattern": [
          " A ",
          " A ",
          " A "
        ],
        "key": {
          "A": {
            "item": "powah:dielectric_paste"
          }
        },
        "result": {
          "item": "4x powah:dielectric_rod"
        }
      }).id('powah:crafting/dielectric_rod')
      
    //Dielectric Rod Horizontal
    event.custom({
        "type": "extendedcrafting:shaped_table",
        "pattern": [
          "   ",
          "AAA",
          "   "
        ],
        "key": {
          "A": {
            "item": "powah:dielectric_paste"
          }
        },
        "result": {
          "item": "4x powah:dielectric_rod_horizontal"
        }
      }).id('powah:crafting/dielectric_rod_h')

    //Energizing Orb
    event.shaped('powah:energizing_orb',
    ['111','121','333'], {
        1: 'allthecompressed:glass_3x',
        2: 'powah:dielectric_casing',
        3: '#forge:ingots/black_iron'
    }).id('powah:crafting/energizing_orb')

    //Basic Capacitor
    event.shaped('2x powah:capacitor_basic',
    [' 12','131','21 '], {
        1: '#forge:ingots/compressed_iron',
        2: 'powah:dielectric_paste',
        3: '#forge:storage_blocks/redstone'
    }).id('powah:crafting/capacitor_basic')

    //Energized Steel
    event.recipes.powah.energizing(["#forge:ingots/allthemodium", "#forge:ingots/steel"], "powah:steel_energized", 15000).id(`powah:energizing/energized_steel`)

    //Blazing Crystal
    event.recipes.powah.energizing(["#forge:ingots/draconium_awakened"], "powah:crystal_blazing", 90000).id(`powah:energizing/blazing_crystal`)

    //Niotic Crystal
    event.recipes.powah.energizing(["#forge:gems/mana_diamond"], "powah:crystal_niotic", 300000).id(`powah:energizing/niotic_crystal`)

    //Spirited (Crystal)
    event.recipes.powah.energizing(["#forge:ingots/terrasteel"], "powah:crystal_spirited", 1000000).id(`powah:energizing/spirited_crystal`)

    //Energized Steel Block
    event.recipes.powah.energizing(["#forge:storage_blocks/allthemodium", "#forge:storage_blocks/steel"], "powah:energized_steel_block", 90000).id(`powah:energizing/allthecompressed/energized_steel/block`)

    //Niotic Crystal Block
    event.recipes.powah.energizing(["botania:mana_diamond_block"], "powah:niotic_crystal_block", 2700000).id(`powah:energizing/allthecompressed/niotic_crystal/block`)

    //Spirited Crystal Block
    event.recipes.powah.energizing(["#forge:storage_blocks/terrasteel"], "powah:spirited_crystal_block", 9000000).id(`powah:energizing/allthecompressed/spitited_crystal/block`)

    //Blazing Capacitor
    event.replaceInput(
      { id: 'powah:crafting/capacitor_blazing' }, // Arg 1: the filter
      'powah:capacitor_basic_large',            // Arg 2: the item to replace
      'powah:capacitor_hardened'         // Arg 3: the item to replace it with
    )
    
    //Niotic Capacitor
    event.replaceInput(
      { id: 'powah:crafting/capacitor_niotic' }, // Arg 1: the filter
      'powah:capacitor_basic_large',            // Arg 2: the item to replace
      'powah:capacitor_blazing'         // Arg 3: the item to replace it with
    )
    
    //Spirited Capacitor
    event.replaceInput(
      { id: 'powah:crafting/capacitor_spirited' }, // Arg 1: the filter
      'powah:capacitor_basic_large',            // Arg 2: the item to replace
      'powah:capacitor_niotic'         // Arg 3: the item to replace it with
    )
    
    //Nitro Capacitor
    event.replaceInput(
      { id: 'powah:crafting/capacitor_nitro' }, // Arg 1: the filter
      'powah:capacitor_basic_large',            // Arg 2: the item to replace
      'powah:capacitor_spirited'         // Arg 3: the item to replace it with
    )
})