mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-12 08:27:37 +00:00
Fix scrolling recipes when hovering over ingredients changes stack size (#237)
This commit is contained in:
1 parent
d6a6551561
commit
8717df0cbb
1 file changed
+6
-3
@@ -229,6 +229,11 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
|
||||
if (!NEIClientConfig.isEnabled() || GuiInfo.hasCustomSlots(gui) || !NEIClientConfig.isMouseScrollTransferEnabled())
|
||||
return false;
|
||||
|
||||
// slot in GuiRecipe does not contain actual stack
|
||||
// and scroll should be handled by GuiRecipe, not here
|
||||
if (gui instanceof GuiRecipe)
|
||||
return false;
|
||||
|
||||
Point mousePos = getMousePosition();
|
||||
Slot mouseover = manager.window.getSlotAtPosition(mousePos.x, mousePos.y);
|
||||
if (mouseover != null && mouseover.getHasStack()) {
|
||||
@@ -239,9 +244,7 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
|
||||
fastTransferManager.transferItem(manager.window, mouseover.slotNumber);
|
||||
else
|
||||
fastTransferManager.retrieveItem(manager.window, mouseover.slotNumber);
|
||||
// slot in GuiRecipe does not contain an actual stack
|
||||
// and scroll should also be handled by GuiRecipe
|
||||
return !(gui instanceof GuiRecipe);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user