2014-06-14 21:40:45 +02:00
|
|
|
package com.pahimar.ee3.recipe;
|
|
|
|
|
2014-07-23 04:12:04 +02:00
|
|
|
import com.pahimar.ee3.api.RecipeRegistryProxy;
|
2014-07-07 21:31:10 +02:00
|
|
|
import com.pahimar.ee3.exchange.WrappedStack;
|
2014-06-14 21:40:45 +02:00
|
|
|
import com.pahimar.ee3.util.RecipeHelper;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.item.crafting.CraftingManager;
|
|
|
|
import net.minecraft.item.crafting.IRecipe;
|
|
|
|
import net.minecraft.item.crafting.ShapedRecipes;
|
|
|
|
import net.minecraft.item.crafting.ShapelessRecipes;
|
|
|
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
|
|
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class RecipesVanilla
|
|
|
|
{
|
2014-07-24 22:01:42 +02:00
|
|
|
public static void registerRecipes()
|
2014-06-14 21:40:45 +02:00
|
|
|
{
|
|
|
|
for (Object recipeObject : CraftingManager.getInstance().getRecipeList())
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Vanilla
|
|
|
|
*/
|
|
|
|
if (recipeObject instanceof ShapedRecipes || recipeObject instanceof ShapelessRecipes || recipeObject instanceof ShapedOreRecipe || recipeObject instanceof ShapelessOreRecipe)
|
|
|
|
{
|
|
|
|
IRecipe recipe = (IRecipe) recipeObject;
|
|
|
|
ItemStack recipeOutput = recipe.getRecipeOutput();
|
|
|
|
|
|
|
|
if (recipeOutput != null)
|
|
|
|
{
|
2014-07-22 03:43:04 +02:00
|
|
|
List<WrappedStack> recipeInputs = RecipeHelper.getRecipeInputs(recipe);
|
2014-06-14 21:40:45 +02:00
|
|
|
|
|
|
|
if (!recipeInputs.isEmpty())
|
|
|
|
{
|
2014-07-23 04:12:04 +02:00
|
|
|
RecipeRegistryProxy.addRecipe(recipeOutput, recipeInputs);
|
2014-06-14 21:40:45 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|