Updated the guide so that it had more infos
This commit is contained in:
parent
150ed4c6a9
commit
8c8331eddf
4 changed files with 85 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue