Recipe Group Optimization (#1054)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
slprimeandgithub-actions[bot] authored and GitHub committed 2026-09-28 00:19:29 +03:00
1 parent 9f3697bb67
commit a685efb3b7
11 files changed
+654 -214

No files matched your search

@@ -524,6 +524,13 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
}
public int openTargetRecipe(RecipeId recipeId) {
return openTargetRecipe(recipeId, null);
}
/**
* @param pinnedIngredients when not null, the found recipe is paused with these ingredients shown
*/
public int openTargetRecipe(RecipeId recipeId, List<ItemStack> pinnedIngredients) {
int recipeIndex = -1;
int recipetype = 0;
@@ -551,6 +558,10 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
setRecipePage(recipetype);
this.handlerPages.gotoRecipeIndex(Math.max(0, recipeIndex));
if (pinnedIngredients != null && recipeIndex >= 0) {
this.handlerPages.pinRecipe(recipeIndex, pinnedIngredients);
}
return recipeIndex;
}