Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix/nei-tooltip' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master committed Sep 10, 2024
2 parents 3972ed7 + b0a0966 commit f1b6f38
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import codechicken.nei.guihook.GuiContainerManager;
import codechicken.nei.guihook.IContainerDrawHandler;
import codechicken.nei.guihook.IContainerInputHandler;
import codechicken.nei.guihook.IContainerObjectHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand Down Expand Up @@ -148,7 +147,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
drawHandler.postRenderObjects(this, mouseX, mouseY);
}

if (!shouldRenderOurTooltip() && shouldRenderNEITooltip() && GuiContainerManager.getManager() != null) {
if (!shouldRenderOurTooltip() && GuiContainerManager.getManager() != null) {
GuiContainerManager.getManager().renderToolTips(mouseX, mouseY);
}
}
Expand Down Expand Up @@ -333,17 +332,6 @@ protected boolean shouldRenderOurTooltip() {
return context.getCursor().getHovered() != null;
}

protected boolean shouldRenderNEITooltip() {
// taken from GuiContainerManager#getStackMouseOver but don't check #getSlotMouseOver
// as it sees our slot even if it's disabled
for (IContainerObjectHandler objectHandler : GuiContainerManager.objectHandlers) {
ItemStack item = objectHandler
.getStackUnderMouse(this, context.getCursor().getPos().x, context.getCursor().getPos().y);
if (item != null) return true;
}
return false;
}

public void drawDebugScreen() {
Size screenSize = context.getScaledScreenSize();
int neiYOffset = shouldShowNEI() ? 20 : 0;
Expand Down

0 comments on commit f1b6f38

Please sign in to comment.