diff --git a/src/main/java/com/gtnewhorizons/modularui/common/internal/wrapper/ModularGui.java b/src/main/java/com/gtnewhorizons/modularui/common/internal/wrapper/ModularGui.java index 1cafeaf..62416b0 100644 --- a/src/main/java/com/gtnewhorizons/modularui/common/internal/wrapper/ModularGui.java +++ b/src/main/java/com/gtnewhorizons/modularui/common/internal/wrapper/ModularGui.java @@ -147,7 +147,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { drawHandler.postRenderObjects(this, mouseX, mouseY); } - if (!shouldRenderOurTooltip() && GuiContainerManager.getManager() != null) { + if (!shouldRenderOurTooltip() && shouldRenderNEITooltip() && GuiContainerManager.getManager() != null) { GuiContainerManager.getManager().renderToolTips(mouseX, mouseY); } } @@ -332,6 +332,13 @@ protected boolean shouldRenderOurTooltip() { return context.getCursor().getHovered() != null; } + protected boolean shouldRenderNEITooltip() { + Slot slot = GuiContainerManager.getSlotMouseOver(this); + // NEI will see slots through popup panel, so block them. + // Other than this case, any element in NEI can have tooltip. + return !(slot instanceof BaseSlot); + } + public void drawDebugScreen() { Size screenSize = context.getScaledScreenSize(); int neiYOffset = shouldShowNEI() ? 20 : 0;