Fix setRecipes(List) not setting Knowledge Book recipes.

Iterator source for recipe NamespacedKeys is changed to use method
parameter 'recipes' specifying recipes to be added, rather than class
property 'recipes', to which recipes are added.
This commit is contained in:
Javacraft 2018-12-05 19:22:03 -05:00
parent aa36c8417b
commit 5f5a6767e8

View File

@ -116,7 +116,7 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
@Override
public void setRecipes(List<NamespacedKey> recipes) {
this.recipes.clear();
for (NamespacedKey recipe : this.recipes) {
for (NamespacedKey recipe : recipes) {
addRecipe(recipe);
}
}