settings.logAddedRecipes = true
settings.logRemovedRecipes = true
settings.logSkippedRecipes = false
settings.logErroringRecipes = true
console.info('Scripts have been reloaded')

let creativerecipes = (output,i1,i2,i3,i4,i5,i6,i7) => {
  onEvent('recipes', e => 
  {e.recipes.extendedcrafting.shaped_table(output, 
    ['123454321',
    '234555432',
    '345666543',
    '456666654',
    '556676655',
    '456666654',
    '345666543',
    '234555432',
    '123454321'], 
    {1:i1,2:i2,3:i3,4:i4,5:i5,6:i6,7:i7})})}

onEvent('recipes', e => {
  e.remove({output: 'extradisks:infinite_storage_disk'})
  e.remove({output: 'creativecrafter:creative_crafter'})
  e.remove({output: 'creativeapiary:tcreative_apiary'})
  e.remove({output: 'extendedcrafting:ultimate_singularity'})
  e.remove({output: 'projectex:final_star'})
  e.remove({output: 'irongenerators:infinity_generator'})
  //Ultimate Singularity
  e.recipes.extendedcrafting.shapeless_table('extendedcrafting:ultimate_singularity', [Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:bronze"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:invar"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:electrum"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:steel"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:lapis_lazuli"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:uranium"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:emerald"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:coal"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:redstone"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:glowstone"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:nickel"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:lead"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:iron"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:copper"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:platinum"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:diamond"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:tin"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:silver"}'), Item.of('extendedcrafting:singularity', '{Id:"extendedcrafting:aluminum"}')]);
  e.recipes.extendedcrafting.shapeless_table('projectex:final_star', [Item.of('botania:creative_pool'), Item.of("appliedenergistics2:creative_storage_cell"), Item.of("ironjetpacks:creative_jetpack"), Item.of("ironfurnaces:rainbow_coal"), Item.of("refinedstorageaddons:creative_wireless_crafting_grid"), Item.of('powah:energy_cell_creative'), Item.of("mysticalagradditions:creative_essence"), Item.of("extradisks:infinite_storage_disk"), Item.of('refinedstorage:creative_controller'), Item.of("storagedrawers:creative_storage_upgrade"), Item.of("create:creative_fluid_tank"), Item.of("create:creative_motor"), Item.of("mekanism:creative_chemical_tank"), Item.of("mekanism:creative_fluid_tank"), Item.of("mekanism:creative_energy_cube"), Item.of('ironfurnaces:million_furnace'), Item.of('irongenerators:infinity_generator'), Item.of('create:creative_blaze_cake'), Item.of('creativecrafter:creative_crafter'), Item.of('allthemodium:unobtainium_allthemodium_alloy_block')])

  //creative crafter
  onEvent('recipes', e => {
    //energizing
    let crafter = (output, item, item2) => {
        e.custom({
          "type": "powah:energizing",
          "ingredients": [
            {"item": item},
            {"item": item2}
          ],
          "energy": 100000000,
          "result": {
            "item": output
          }
        })
      }
      crafter('creativecrafter:creative_crafter', 'extrastorage:netherite_crafter', 'refinedstorage:creative_controller')
    })

    onEvent('recipes', e => {
      //energizing
      let chest = (output, item, item2) => {
          e.custom({
            "type": "powah:energizing",
            "ingredients": [
              {"item": item},
              {"item": item2},
              {"item": item2}
            ],
            "energy": 100000000,
            "result": {
              "item": output
            }
          })
        }
        chest('extrautilitiesrebirth:creative_chest', 'draconicevolution:draconium_chest', 'projectex:final_star')
      })

      onEvent('recipes', e => {
        //energizing
        let chest = (output, item, item2) => {
            e.custom({
              "type": "powah:energizing",
              "ingredients": [
                {"item": item},
                {"item": item2},
                {"item": item2},
                {"item": item2},
                {"item": item2},
                {"item": item2}
              ],
              "energy": 10000000,
              "result": {
                "item": output
              }
            })
          }
          chest('create:creative_blaze_cake', 'mysticalagradditions:creative_essence', 'create:blaze_cake')
        })

        let mekanismrecipes = (output,i1,i2,i3,i4,i5,i6,i7) => {
          onEvent('recipes', e => 
          {e.recipes.extendedcrafting.shaped_table(output, 
            ['123444321',
            '212343212',
            '326636623',
            '436555634',
            '443575344',
            '436555634',
            '326636623',
            '212343212',
            '123444321'], 
            {1:i1,2:i2,3:i3,4:i4,5:i5,6:i6,7:i7})})}
            
            //creative energy cube
            mekanismrecipes("mekanism:creative_energy_cube","mekanism:ultimate_energy_cube","mekanism:elite_energy_cube","mekanism:advanced_energy_cube","mekanism:basic_energy_cube","mekanism:alloy_atomic","mekanism:ultimate_control_circuit","extendedcrafting:ultimate_singularity")
            
            //creative fluid tank
            mekanismrecipes("mekanism:creative_fluid_tank","mekanism:ultimate_fluid_tank","mekanism:elite_fluid_tank","mekanism:advanced_fluid_tank","mekanism:basic_fluid_tank","mekanism:alloy_reinforced","mekanism:elite_control_circuit",'extendedcrafting:ultimate_singularity')

            //creative chemical tank
            mekanismrecipes("mekanism:creative_chemical_tank","mekanism:ultimate_chemical_tank","mekanism:elite_chemical_tank","mekanism:advanced_chemical_tank","mekanism:basic_chemical_tank","mekanism:alloy_infused","mekanism:advanced_control_circuit",'extendedcrafting:ultimate_singularity')

            //creative Motor
            mekanismrecipes("create:creative_motor","create:creative_blaze_cake","createaddition:electric_motor","createaddition:electric_motor","createaddition:electric_motor","create:andesite_alloy","create:brass_sheet",'extendedcrafting:ultimate_singularity')

            //creative Fluid Tank (Create)
            mekanismrecipes("create:creative_fluid_tank","create:creative_blaze_cake","create:fluid_tank","create:fluid_tank","create:fluid_tank","create:andesite_alloy","create:brass_sheet",'extendedcrafting:ultimate_singularity')

            //creative storage upgrade
            mekanismrecipes("storagedrawers:creative_storage_upgrade","storagedrawers:emerald_storage_upgrade","storagedrawers:diamond_storage_upgrade","storagedrawers:gold_storage_upgrade","storagedrawers:iron_storage_upgrade","storagedrawers:obsidian_storage_upgrade","mysticalagradditions:creative_essence","storagedrawers:upgrade_template")

             //creative controller
            mekanismrecipes('refinedstorage:creative_controller',"extradisks:withering_processor","extrastorage:neural_processor","refinedstorage:advanced_processor","refinedstorage:improved_processor","refinedstorage:basic_processor","refinedstorage:silicon", 'extendedcrafting:ultimate_singularity')

            //creative mystical agradditions essence
            mekanismrecipes('mysticalagradditions:creative_essence',"mysticalagradditions:insanium_essence","mysticalagriculture:supremium_essence","mysticalagriculture:imperium_essence","mysticalagriculture:tertium_essence","mysticalagriculture:supremium_essence","mysticalagradditions:insanium_essence", 'mysticalagriculture:master_infusion_crystal')

            //infinite storage disk
            mekanismrecipes("extradisks:infinite_storage_disk","extradisks:1048576k_storage_disk","extradisks:262144k_storage_disk","extradisks:65536k_storage_disk","extradisks:16384k_storage_disk","extrastorage:neural_processor","refinedstorage:controller","extradisks:advanced_storage_housing")
            
            //rainbow furnace
            mekanismrecipes("ironfurnaces:million_furnace","ironfurnaces:unobtainium_furnace","ironfurnaces:vibranium_furnace","ironfurnaces:allthemodium_furnace","ironfurnaces:netherite_furnace","ironfurnaces:obsidian_furnace","ironfurnaces:rainbow_plating","ironfurnaces:rainbow_core")

            //Creative ME Storage Disk
            mekanismrecipes("appliedenergistics2:creative_storage_cell", "aeadditions:item_storage_cell_16384", "aeadditions:item_storage_cell_16384", "aeadditions:item_storage_cell_1024", "aeadditions:item_storage_cell_256", "appliedenergistics2:fluix_pearl", "appliedenergistics2:empty_storage_cell" ,"extendedcrafting:ultimate_singularity")

            //creative jetpack
            mekanismrecipes("ironjetpacks:creative_jetpack","ironjetpacks:emerald_jetpack", "ironjetpacks:diamond_jetpack", "ironjetpacks:gold_jetpack","ironjetpacks:iron_jetpack", "ironjetpacks:stone_jetpack", "mysticalagradditions:creative_essence",'extendedcrafting:ultimate_singularity')

            //rainbow coal
            mekanismrecipes("ironfurnaces:rainbow_coal","projecte:aeternalis_fuel","projecte:mobius_fuel","immersiveengineering:coal_coke", "minecraft:coal","ironfurnaces:rainbow_core", "ironfurnaces:rainbow_plating", 'extendedcrafting:ultimate_singularity')
            
            //creative wireless grid
            mekanismrecipes("refinedstorageaddons:creative_wireless_crafting_grid","refinedstorageaddons:wireless_crafting_grid","refinedstorage:wireless_grid","refinedstorage:wireless_crafting_monitor","refinedstorage:wireless_transmitter", "refinedstorage:crafting_grid", "refinedstorage:controller", 'refinedstorage:creative_controller')
            
            //creative energy cell (powah)
            mekanismrecipes("powah:energy_cell_creative", "powah:energy_cell_nitro", "powah:energy_cell_spirited", "powah:energy_cell_niotic", "powah:energy_cell_blazing", "powah:energy_cell_hardened", "powah:energy_cell_basic","draconicevolution:chaotic_capacitor")

            //creative mana pool
            mekanismrecipes("botania:creative_pool","botania:gaia_ingot","botania:life_essence","botania:elementium_ingot","botania:terrasteel_ingot","botania:fabulous_pool","botania:mana_pool","botania:twig_wand")
            
            //creative mana pool
            mekanismrecipes("irongenerators:infinity_generator","irongenerators:unobtainium_generator","irongenerators:vibranium_generator","irongenerators:allthemodium_generator","irongenerators:netherite_generator","irongenerators:obsidian_generator","projecte:rm_furnace","extendedcrafting:ultimate_singularity")
})