Fix empty recipe type in RecipeIterator

This commit is contained in:
IzzelAliz 2021-04-24 11:55:22 +08:00
parent c9ca494430
commit 0e02e12b3f

View File

@ -28,7 +28,14 @@ public class RecipeIteratorMixin {
*/ */
@Overwrite @Overwrite
public boolean hasNext() { 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;
} }
/** /**