Esempio n. 1
0
 public static Recipe GetRecipe(Recipe[] recipes, ItemStack[] ingredients)
 {
     foreach (Recipe r in recipes)
     {
         if (r.Matches(ingredients))
         {
             Console.WriteLine("Matches recipe: " + r.Result.Type + " " + r.Result.Count);
             return r;
         }
     }
     return null;
 }
Esempio n. 2
0
 public static Recipe GetRecipe(Recipe[] recipes, ItemStack[] ingredients)
 {
     foreach (Recipe r in recipes)
     {
         if (r.Matches(ingredients))
             return r;
     }
     return null;
 }