Updated the guide so that it had more infos

This commit is contained in:
WayofTime 2016-06-08 15:36:47 -04:00
parent 150ed4c6a9
commit 8c8331eddf
4 changed files with 85 additions and 1 deletions

View file

@ -1,5 +1,7 @@
package WayofTime.bloodmagic.util.helper;
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
@ -25,4 +27,24 @@ public class RecipeHelper
return null;
}
public static TartaricForgeRecipe getForgeRecipeForOutput(ItemStack stack)
{
for (TartaricForgeRecipe recipe : TartaricForgeRecipeRegistry.getRecipeList())
{
if (recipe != null)
{
ItemStack resultStack = recipe.getRecipeOutput();
if (resultStack != null && resultStack.getItem() != null)
{
if (resultStack.getItem() == stack.getItem() && resultStack.getItemDamage() == stack.getItemDamage())
{
return recipe;
}
}
}
}
return null;
}
}