public static SmeltingRecipe GetRecipe(SmeltingRecipe[] recipes, ItemInventory ingredient) { foreach (SmeltingRecipe r in recipes) { if (r.Ingredient.StacksWith(ingredient)) return r; } return null; }
public static SmeltingRecipe GetRecipe(SmeltingRecipe[] recipes, ItemStack ingredient) { foreach (SmeltingRecipe r in recipes) { if (r.Ingredient.StacksWith(ingredient)) { Console.WriteLine("Matches smelting recipe: " + r.Result.Type + " " + r.Result.Count); return r; } } return null; }