Recipe search improvement (#706)

Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
slprimeandMartin Robertz authored and GitHub committed 2025-09-04 15:59:51 +02:00
1 parent bba0a11466
commit b1bedcf403
38 files changed
+733 -664

No files matched your search

@@ -83,17 +83,20 @@ public class PresetsList {
}
@Override
public boolean matches(IRecipeHandler handler, List<PositionedStack> ingredients, PositionedStack result,
List<PositionedStack> others) {
public boolean matches(IRecipeHandler handler, int recipeIndex) {
if (matchPositionedStack(ingredients, false)) {
if (matchPositionedStack(handler.getIngredientStacks(recipeIndex), false)) {
return false;
}
final PositionedStack result = handler.getResultStack(recipeIndex);
if (result != null && matchPositionedStack(result)) {
return true;
}
final List<PositionedStack> others = handler.getOtherStacks(recipeIndex);
if (!others.isEmpty() && matchPositionedStack(others, true)) {
return true;
}