From 5f5a6767e8f51bfa5b1c15b0db597cd4a12bf3f2 Mon Sep 17 00:00:00 2001 From: Javacraft Date: Wed, 5 Dec 2018 19:22:03 -0500 Subject: 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. --- .../java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java index e68a7d06..29471e0f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java @@ -116,7 +116,7 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo @Override public void setRecipes(List recipes) { this.recipes.clear(); - for (NamespacedKey recipe : this.recipes) { + for (NamespacedKey recipe : recipes) { addRecipe(recipe); } } -- cgit v1.2.3