BloodMagic/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java

42 lines
1.2 KiB
Java
Raw Normal View History

package WayofTime.bloodmagic.api.registry;
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class TartaricForgeRecipeRegistry
{
private static List<TartaricForgeRecipe> recipeList = new ArrayList<TartaricForgeRecipe>();
public static void registerRecipe(TartaricForgeRecipe recipe)
{
recipeList.add(recipe);
}
public static void registerRecipe(ItemStack outputStack, double minimulSouls, double drain, Object... objects)
{
registerRecipe(new TartaricForgeRecipe(outputStack, minimulSouls, drain, objects));
}
public static TartaricForgeRecipe getMatchingRecipe(List<ItemStack> itemList, World world, BlockPos pos)
{
for (TartaricForgeRecipe recipe : recipeList)
{
if (recipe.matches(itemList, world, pos))
{
return recipe;
}
}
return null;
}
2016-03-16 18:41:06 -04:00
public static List<TartaricForgeRecipe> getRecipeList()
{
return new ArrayList<TartaricForgeRecipe>(recipeList);
}
}