예제 #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;
 }
예제 #2
0
파일: Recipe.cs 프로젝트: Nirad/c-raft
 public static Recipe GetRecipe(Recipe[] recipes, ItemStack[] ingredients)
 {
     foreach (Recipe r in recipes)
     {
         if (r.Matches(ingredients))
             return r;
     }
     return null;
 }