// priority: 0

settings.logAddedRecipes = true
settings.logRemovedRecipes = true
settings.logSkippedRecipes = false
settings.logErroringRecipes = true

console.info('Scripts have been reloaded')
onEvent('recipes', e => {
	
	//removing blocks
	function removeBlock(block) {e.remove({output: block})}

	//removed
	e.remove({output: "minecraft:"})
	
	removeBlock('projecte:philosophers_stone')

	//block recipes
	e.shaped('4x minecraft:dirt', ['II', 'II'], {I: "#minecraft:saplings",})
  e.shaped('projecte:philosophers_stone', ['IRI','RDR','IRI'], {D: 'minecraft:diamond_block', I: 'mysticalagradditions:insanium_essence', R: 'minecraft:redstone_block'})
  e.shaped('projecte:philosophers_stone', ['RIR','IDI','RIR'], {D: 'minecraft:diamond_block', I: 'mysticalagradditions:insanium_essence', R: 'minecraft:redstone_block'})


})

//immersive engineering alloys
onEvent('recipes', e => {
	// e.recipes.immersiveengineeringAlloy('allthemodium:unobtainium_allthemodium_alloy_ingot', 'allthemodium:unobtainium_ingot', 'allthemodium:allthemodium_ingot')


//energizing
let dust = (output, item) => {
    e.custom({
      "type": "powah:energizing",
      "ingredients": [
        {"item": item}
      ],
      "energy": 100,
      "result": {
        "item": output
      }
    })
  }

  dust('powah:uraninite', 'alltheores:uranium_ingot')


  //energized steel block
  let esb = (output, item, item2) => {
    e.custom({
      "type": "powah:energizing",
      "ingredients": [
        {"item": item},
        {"item": item2},
      ],
      "energy": 100000,
      "result": {
        "item": output
      }
    })
  }

  esb('powah:energized_steel_block', 'minecraft:gold_block', 'minecraft:iron_block')

  //blazing crystal block
  let bcb = (output, item) => {
    e.custom({
      "type": "powah:energizing",
      "ingredients": [
        {"item": item}
      ],
      "energy": 90000,
      "result": {
        "item": output
      }
    })
  }

  bcb('powah:blazing_crystal_block', 'botania:blaze_block')

  //niotic crystal block
  let ncb = (output, item) => {
    e.custom({
      "type": "powah:energizing",
      "ingredients": [
        {"item": item}
      ],
      "energy": 300000,
      "result": {
        "item": output
      }
    })
  }

  ncb('powah:niotic_crystal_block', 'minecraft:diamond_block')

  //spirited crystal block
  let scb = (output, item) => {
    e.custom({
      "type": "powah:energizing",
      "ingredients": [
        {"item": item}
      ],
      "energy": 1000000,
      "result": {
        "item": output
      }
    })
  }

scb('powah:spirited_crystal_block', 'minecraft:emerald_block')

//boss spawner
let abs = (output, item, item2) => {
  e.custom({
    "type": "powah:energizing",
    "ingredients": [
      {"item": item},
      {"item": item2},
      {"item": item2},
      {"item": item2},
      {"item": item2},
      {"item": item2}
    ],
    "energy": 100000000,
    "result": {
      "item": output
    }
  })
}

abs('apotheosis:boss_summoner', 'minecraft:skeleton_skull' ,'mysticalagradditions:creative_essence')

})

onEvent('recipes', e => {
e.recipes.mekanismMetallurgicInfusing("appliedenergistics2:quartz_ore", "appliedenergistics2:certus_quartz_dust", "mekanism:redstone", 10)
e.recipes.mekanismMetallurgicInfusing("exnihilosequentia:chunk_platinum", "exnihilosequentia:chunk_iron", "mekanism:diamond", 20)
})