From 98ccac33d9fb30b620896a0ff8e4652396723074 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 5 Dec 2018 19:22:03 -0500 Subject: [PATCH] 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 --- .../bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java index e68a7d066..29471e0f7 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java +++ b/paper-server/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); } }