mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-17 02:55:04 +00:00
Add Recipe Groups to GuiRecipe (#1049)
This commit is contained in:
1 parent
3c472a02cb
commit
a54c414595
16 files changed
+1464
-840
No files matched your search
@@ -52,15 +52,10 @@ class SearchRecipeHandler<H extends IRecipeHandler> {
|
||||
|
||||
public static int findFirst(IRecipeHandler handler, IntPredicate predicate) {
|
||||
final IRecipeFilter filter = searchingAvailable(handler) ? GuiRecipe.getRecipeListFilter() : null;
|
||||
int refIndex = -1;
|
||||
|
||||
for (int recipeIndex = 0; recipeIndex < handler.numRecipes(); recipeIndex++) {
|
||||
if (filter == null || mathRecipe(handler, recipeIndex, filter)) {
|
||||
refIndex++;
|
||||
|
||||
if (predicate.test(recipeIndex)) {
|
||||
return refIndex;
|
||||
}
|
||||
if ((filter == null || mathRecipe(handler, recipeIndex, filter)) && predicate.test(recipeIndex)) {
|
||||
return recipeIndex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user