diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java index 1223bfc7f5..28f77a341e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java @@ -19,13 +19,23 @@ public class RecipeIterator implements Iterator { @Override public boolean hasNext() { - return (current != null && current.hasNext()) || recipes.hasNext(); + if (current != null && current.hasNext()) { + return true; + } + + if (recipes.hasNext()) { + current = recipes.next().getValue().values().iterator(); + return hasNext(); + } + + return false; } @Override public Recipe next() { if (current == null || !current.hasNext()) { current = recipes.next().getValue().values().iterator(); + return next(); } return current.next().toBukkitRecipe();