Updated The Architect section of the documentation

This commit is contained in:
WayofTime 2016-06-19 16:12:20 -04:00
parent 6aff707708
commit 1c66a2fc61
7 changed files with 159 additions and 35 deletions

View file

@ -1,6 +1,7 @@
package WayofTime.bloodmagic.util.helper;
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry;
import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
@ -28,6 +29,26 @@ public class RecipeHelper
return null;
}
public static AltarRecipeRegistry.AltarRecipe getAltarRecipeForOutput(ItemStack stack)
{
for (AltarRecipeRegistry.AltarRecipe recipe : AltarRecipeRegistry.getRecipes().values())
{
if (recipe != null)
{
ItemStack resultStack = recipe.getOutput();
if (resultStack != null && resultStack.getItem() != null)
{
if (resultStack.getItem() == stack.getItem() && resultStack.getItemDamage() == stack.getItemDamage())
{
return recipe;
}
}
}
}
return null;
}
public static TartaricForgeRecipe getForgeRecipeForOutput(ItemStack stack)
{
for (TartaricForgeRecipe recipe : TartaricForgeRecipeRegistry.getRecipeList())