Fix item hotkeys on crafting tree Crafting slots (#1151)

Co-authored-by: Lorenzo <[email protected]>
Co-authored-by: Chitak 985 <[email protected]>
Co-authored-by: slprime <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-11-25 09:08:16 +02:00
1 parent bdadcc37a6
commit a665a5be56
2 files changed
+2 -2

No files matched your search

@@ -524,7 +524,7 @@ class StatsPanel extends ScrollContainer {
public ItemStack getStackMouseOver(int mouseX, int mouseY) {
final Widget widget = getWidgetUnderMouse(mouseX, mouseY);
return widget instanceof ItemStatsSlot slot && slot.recipeId == null ? slot.getStack() : null;
return widget instanceof ItemStatsSlot slot ? slot.getStack() : null;
}
public void setHighlight(SearchResult searchResult) {
@@ -640,7 +640,7 @@ public class GuiContainerManager {
tooltip = handler.handleTooltip(window, mousex, mousey, tooltip);
}
ItemStack stack = getStackMouseOver(window);
ItemStack stack = tooltip.isEmpty() ? getStackMouseOver(window) : null;
boolean showTooltip = shouldShowTooltip(window);
if (tooltip.isEmpty() && showTooltip) { // mouseover tip, not holding an item
font = getFontRenderer(stack);