private void processConfig(RecipeConfig config) { List<Recipe> newRecipes = config.getRecipes(false); Log.info("Found " + newRecipes.size() + " valid Vat recipes in config."); for (Recipe rec : newRecipes) { addRecipe(rec); } Log.info("Finished processing Vat recipes. " + recipes.size() + " recipes avaliable."); }
public void merge(RecipeConfig userConfig) { if (userConfig.dumpItemRegistery) { dumpItemRegistery = true; } if (userConfig.dumpOreDictionary) { dumpOreDictionary = true; } for (RecipeGroup group : userConfig.getRecipeGroups().values()) { if (!group.enabled) { if (recipeGroups.remove(group.name) != null) { Log.info("Disabled core recipe group " + group.name + " due to user config."); } } else { RecipeGroup modifyGroup = recipeGroups.get(group.name); if (modifyGroup == null) { Log.info("Added user defined recipe group " + group.name); modifyGroup = new RecipeGroup(group.name); recipeGroups.put(group.name, modifyGroup); } for (RecipeElement recipe : group.recipes.values()) { if (recipe.isValid()) { if (modifyGroup.recipes.containsKey(recipe.name)) { Log.info("Replacing core recipe " + recipe.name + " with user defined recipe."); } else { Log.info("Added user defined recipe " + recipe.name); } modifyGroup.addRecipe(recipe); } else { Log.info("Removed recipe " + recipe.name + " due to user config."); modifyGroup.recipes.remove(recipe.name); } } } } }