예제 #1
0
 /**
  * @param stack the item
  * @return the thaumcraft recipe key that produces that item. Used by the thaumonomicon drilldown
  *     feature.
  */
 public static String getCraftingRecipeKey(ItemStack stack) {
   for (Object r : getCraftingRecipes()) {
     if (r instanceof IArcaneRecipe) {
       if (ThaumcraftApiHelper.areItemsEqual(stack, ((IArcaneRecipe) r).getRecipeOutput()))
         return ((IArcaneRecipe) r).getKey();
     }
     if (r instanceof IInfusionRecipe) {
       if (ThaumcraftApiHelper.areItemsEqual(stack, ((IInfusionRecipe) r).getRecipeOutput()))
         return ((IInfusionRecipe) r).getKey();
     }
   }
   return "";
 }