// priority: 0

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

console.info(`Recipes Added!`)

onEvent(`recipes`, event => {
	
	metals.forEach(material => {
		products.forEach(product => event.replaceInput(`#forge:${product}s/${material}`, `#forge:${product}s/${material}`))
		products.forEach(product => event.replaceOutput(`#forge:${product}s/${material}`, `emendatusenigmatica:${material}_${product}`))
		
		event.recipes.createSplashing([
			`10x emendatusenigmatica:${material}_nugget`, 
			Item.of(`5x emendatusenigmatica:${material}_nugget`).withChance(0.5)
		], `#forge:crushed_ores/${material}`)

	})
	
	event.replaceOutput(`#forge:wires/copper`, `createaddition:copper_wire`)
	/*
	event.recipes.createSplashing([
		`10x minecraft:iron_nugget`, 
		Item.of(`5x minecraft:iron_nugget`).withChance(0.5)
	], `create:crushed_iron_ore`)
	*/
	event.blasting(`minecraft:iron_ingot`, `create:crushed_iron_ore`)
	event.replaceOutput({}, `#forge:dusts/iron`, `emendatusenigmatica:iron_dust`)
	event.replaceOutput({}, `#forge:rods/iron`, `emendatusenigmatica:iron_rod`)
	
	//wire coils
	event.replaceInput(`#samtext:coils/copper`, `#samtext:coils/copper`)
	
})