Make the "Accepts following:" tooltip work for otherStacks (#625)

Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com>
This commit is contained in:
koolkrafter5andMaya authored and GitHub committed 2025-05-12 14:45:57 +00:00
1 parent 5ad6095c43
commit 29ade6f327
1 file changed
+11 -6
@@ -882,14 +882,19 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
if (NEIClientConfig.showCycledIngredientsTooltip() && itemstack != null) {
PositionedStack hovered = null;
for (int refIndex = 0; refIndex < indices.size() && hovered == null; refIndex++) {
outer: for (int refIndex = 0; refIndex < indices.size(); refIndex++) {
final int recipeIndex = indices.get(refIndex);
final List<PositionedStack> stacks = handler.original.getIngredientStacks(recipeIndex);
for (PositionedStack pStack : stacks) {
if (isMouseOver(pStack, refIndex)) {
hovered = pStack;
break;
List<List<PositionedStack>> stackGroups = Arrays.asList(
handler.original.getIngredientStacks(recipeIndex),
handler.original.getOtherStacks(recipeIndex));
for (List<PositionedStack> group : stackGroups) {
for (PositionedStack pStack : group) {
if (isMouseOver(pStack, refIndex)) {
hovered = pStack;
break outer;
}
}
}
}