// 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: "extradisks:infinite_storage_block"})
  e.remove({output: "extradisks:infinite_fluid_storage_block"})
  e.remove({output: "extradisks:infinite_fluid_storage_part"})
  e.remove({output: "extradisks:infinite_storage_part"})
  e.remove({output: "extradisks:infinite_fluid_storage_disk"})
	
	removeBlock('mysticalagriculture:prosperity_gemstone')
	removeBlock('exnihilosequentia:crook_stone')
	removeBlock('allthemodium:unobtainium_allthemodium_alloy_block')
  removeBlock('ironfurnaces:million_furnace')

	//block recipes
	e.shaped('4x minecraft:dirt', ['II', 'II'], {I: "#minecraft:saplings",})
	e.shaped('draconicevolution:dragon_heart', ['AAA','ANA','AAA'], {A: "draconicevolution:awakened_draconium_ingot",N: "minecraft:nether_star"})
	e.shaped('mysticalagriculture:prosperity_gemstone', [' B ', 'BAB', ' B '], {A: 'botania:mana_diamond', B: 'mysticalagriculture:prosperity_shard'})
	e.shaped('exnihilosequentia:crook_stone', ['PP ', ' P ', ' P '], {P: 'botania:pebble'})
	//smelting
	e.smelting('mysticalagriculture:prosperity_shard', 'mysticalagriculture:inferium_essence')
})

onEvent('recipes', e => {
//energizing

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

  udust('allthemodium:unobtainium_dust', 'mysticalagradditions:creative_essence')


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

  vdust('allthemodium:vibranium_dust', 'allthemodium:unobtainium_dust', 'botania:mana_diamond')


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

  adust('allthemodium:allthemodium_dust', 'allthemodium:vibranium_dust', 'tconstruct:blank_cast')

  //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')

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

cs('draconicevolution:medium_chaos_frag', 'minecraft:dragon_egg', 'draconicevolution:awakened_core')

//UATM
let uatm = (output, item, item2, item3) => {
	e.custom({
		"type": "powah:energizing",
		"ingredients": [
			{"item": item},
			{"item": item2},
			{"item": item3}
		],
		"energy": 1000000,
		"result": {
			"item": output
		}
	})
}

uatm('allthemodium:unobtainium_allthemodium_alloy_block', 'allthemodium:allthemodium_block', 'appliedenergistics2:singularity', 'allthemodium:unobtainium_block')
})