public static List < IRecipe > getRecipesForRequestedOutput ( String output ) { List < IRecipe > matchingRecipes = new ArrayList < IRecipe > ( ) ; ItemStack target = MinecraftTypeHelper . getItemStackFromParameterString ( output ) ; List < ? > recipes = CraftingManager . getInstance ( ) . getRecipeList ( ) ; for ( Object obj : recipes ) { if ( obj == null ) continue ; if ( obj instanceof IRecipe ) { ItemStack is = ( ( IRecipe ) obj ) . getRecipeOutput ( ) ; if ( is == null ) continue ; if ( ItemStack . areItemsEqual ( is , target ) ) { matchingRecipes . add ( ( IRecipe ) obj ) ; } } } return matchingRecipes ; }
Attempt to find all recipes that result in an item of the requested output .