Search in sources :

Example 1 with Recipe

use of minechem.utils.Recipe in project Minechem by iopleke.

the class DecomposerRecipeHandler method recursiveRecipes.

public static void recursiveRecipes() {
    for (MapKey key : Recipe.recipes.keySet()) {
        if (!DecomposerRecipe.recipes.containsKey(key)) {
            Recipe recipe = Recipe.get(key);
            DecomposerRecipe.add(new DecomposerRecipeSuper(recipe.output, recipe.inStacks));
        }
    }
    // Culls null recipes (used for recursion but breaks stuff if left in)
    for (Iterator<Map.Entry<MapKey, DecomposerRecipe>> itr = DecomposerRecipe.recipes.entrySet().iterator(); itr.hasNext(); ) {
        Map.Entry<MapKey, DecomposerRecipe> entry = itr.next();
        if (entry.getValue().isNull()) {
            itr.remove();
        }
    }
}
Also used : MapKey(minechem.utils.MapKey) Recipe(minechem.utils.Recipe) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 MapKey (minechem.utils.MapKey)1 Recipe (minechem.utils.Recipe)1