Add getResultStacks/getAuxiliaryStacks to IRecipeHandler (#1105) (#1131)

Co-authored-by: slprime <[email protected]>
This commit is contained in:
boubou19andslprime authored and GitHub committed 2026-11-19 07:42:56 +01:00
1 parent dc35985ea0
commit 1aa4d56100
17 files changed
+277 -216

No files matched your search

@@ -89,19 +89,19 @@ public class PresetsList {
return false;
}
final PositionedStack result = handler.getResultStack(recipeIndex);
final List<PositionedStack> outputs = handler.getResultStacks(recipeIndex);
if (result != null && matchPositionedStack(result)) {
if (matchPositionedStack(outputs, true)) {
return true;
}
final List<PositionedStack> others = handler.getOtherStacks(recipeIndex);
final List<PositionedStack> auxiliaries = handler.getAuxiliaryStacks(recipeIndex);
if (!others.isEmpty() && matchPositionedStack(others, true)) {
if (matchPositionedStack(auxiliaries, true)) {
return true;
}
return result == null && others.isEmpty();
return outputs.isEmpty() && auxiliaries.isEmpty();
}
private boolean matchPositionedStack(List<PositionedStack> items, boolean dir) {