@Override public void removeRecipe(IInscriberRecipe toBeRemovedRecipe) { for (final Iterator<IInscriberRecipe> iterator = this.recipes.iterator(); iterator.hasNext(); ) { final IInscriberRecipe recipe = iterator.next(); if (recipe.equals(toBeRemovedRecipe)) { iterator.remove(); } } }
@Override public void addRecipe(IInscriberRecipe recipe) { if (recipe == null) { throw new IllegalArgumentException( "Tried to add an invalid (null) inscriber recipe to the registry."); } this.recipes.add(recipe); this.optionals.addAll(recipe.getTopOptional().asSet()); this.optionals.addAll(recipe.getBottomOptional().asSet()); this.inputs.addAll(recipe.getInputs()); }