Compare commits

..
Author SHA1 Message Date
Martin Robertz dc400ea560 update 2024-03-02 00:30:18 +01:00
slprimeandslprime ea03cfa17d Correctly find the recipeId under mouse when using the search (#465)
* Correctly find the recipeId under mouse when using the search

* optimize

---------

Co-authored-by: slprime <[email protected]>
2024-03-01 19:36:15 +01:00
@@ -546,8 +546,9 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
List<Integer> indices = getRecipeIndices();
for (int refIndex = 0; refIndex < indices.size(); refIndex++) {
if (recipeInFocus(refIndex, indices.get(refIndex))) {
return handler.original.getIngredientStacks(indices.get(refIndex));
final int recipeIndex = indices.get(refIndex);
if (recipeInFocus(refIndex, recipeIndex)) {
return handler.original.getIngredientStacks(recipeIndex);
}
}