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.

By: Javacraft <frelling@java-craft.com>
This commit is contained in:
CraftBukkit/Spigot 2018-12-05 19:22:03 -05:00
parent 102dee7d4f
commit 98ccac33d9

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);
}
}