package net.shadowfacts.enfusion.recipes;

import net.shadowfacts.enfusion.block.EFBlocks;
import net.shadowfacts.enfusion.item.EFItems;
import net.shadowfacts.enfusion.machine.grinder.recipe.GrinderOutput;
import net.shadowfacts.enfusion.machine.grinder.recipe.GrinderRecipe;
import nova.core.recipes.RecipeManager;

import java.util.ArrayList;

/**
 * @author shadowfacts
 */
public class EFRecipes {

	public static void registerAll(RecipeManager recipeManager) {
		registerCraftingRecipes(recipeManager);
		registerFurnaceRecipes(recipeManager);
		registerGrinderRecipes(recipeManager);
	}

	private static void registerCraftingRecipes(RecipeManager recipeManager) {

	}

	private static void registerFurnaceRecipes(RecipeManager recipeManager) {

	}

	private static void registerGrinderRecipes(RecipeManager recipeManager) {
		ArrayList<GrinderOutput> outputs = new ArrayList<>();

//		Chalcopyrite
		outputs.add(new GrinderOutput(EFItems.dustCopper, 0.25));
		outputs.add(new GrinderOutput(EFItems.dustIron, 0.25));
		outputs.add(new GrinderOutput(EFItems.sulfur, 0.5));
		recipeManager.addRecipe(new GrinderRecipe(EFBlocks.oreChalcopyrite, outputs));
		outputs = new ArrayList<>();

//		Galena
		outputs.add(new GrinderOutput(EFItems.dustLead, 0.5));
		outputs.add(new GrinderOutput(EFItems.sulfur, 0.5));
		recipeManager.addRecipe(new GrinderRecipe(EFBlocks.oreGalena, outputs));
		outputs = new ArrayList<>();

//		Chlorargyrite
		outputs.add(new GrinderOutput(EFItems.dustSilver, 1));
		recipeManager.addRecipe(new GrinderRecipe(EFBlocks.oreChlorargyrite, outputs));
		outputs = new ArrayList<>();

//		Pyrargyrite
		outputs.add(new GrinderOutput(EFItems.dustSilver, 0.5));
		outputs.add(new GrinderOutput(EFItems.sulfur, 0.5));
		recipeManager.addRecipe(new GrinderRecipe(EFBlocks.orePyrargyrite, outputs));
		outputs = new ArrayList<>();

	}

}

@@ -154,38 +154,41 @@
 wfacts.enfusion.
-machin
+api.recip
 e.grinder.recipe
@@ -177,31 +177,24 @@
 ipe.grinder.
-recipe.
 GrinderOutpu
@@ -232,14 +232,17 @@
 ion.
-machin
+api.recip
 e.gr
@@ -247,23 +247,16 @@
 grinder.
-recipe.
 GrinderR
@@ -300,16 +300,127 @@
 eManager
+;%0Aimport nova.core.recipes.crafting.OreItemIngredient;%0Aimport nova.core.recipes.crafting.SpecificItemIngredient
 ;%0A%0Aimpor
@@ -1218,29 +1218,58 @@
 rRecipe(
-EFBlocks
+new SpecificItemIngredient(%22enfusion
 .ore
-C
+.c
 halcopyr
@@ -1267,24 +1267,26 @@
 chalcopyrite
+%22)
 , outputs));
@@ -1274,32 +1274,61 @@
 yrite%22), outputs
+, %22enfusion.ore.chalcopyrite%22
 ));%0A%09%09outputs = 
@@ -1518,26 +1518,57 @@
 ipe(
-EFBlocks
+new SpecificItemIngredient(%22enfusion
 .ore
-G
+.g
 alena
+%22)
 , ou
@@ -1564,32 +1564,55 @@
 alena%22), outputs
+, %22enfusion.ore.galena%22
 ));%0A%09%09outputs = 
@@ -1754,21 +1754,50 @@
 ipe(
-EFBlocks
+new SpecificItemIngredient(%22enfusion
 .ore
-C
+.c
 hlor
@@ -1796,32 +1796,34 @@
 re.chlorargyrite
+%22)
 , outputs));%0A%09%09o
@@ -1807,32 +1807,62 @@
 yrite%22), outputs
+, %22enfusion.ore.chlorargyrite%22
 ));%0A%09%09outputs = 
@@ -2059,21 +2059,50 @@
 ipe(
-EFBlocks
+new SpecificItemIngredient(%22enfusion
 .ore
-P
+.p
 yrar
@@ -2107,16 +2107,18 @@
 argyrite
+%22)
 , output
@@ -2118,16 +2118,44 @@
  outputs
+, %22enfusion.ore.pyrargyrite%22
 ));%0A%09%09ou

Update EFRecipes for new GrinderRecipe