fix tooltip rendering issue

This commit is contained in:
Raoul Van den Berge
2015-12-13 17:01:56 +01:00
parent f04c1a8fb9
commit 9836dfb77c

View File

@@ -48,6 +48,8 @@ public class GuiGrid extends GuiContainer {
int xx = getGridXStart();
int yy = getGridYStart();
ItemStack toolTip = null;
for (int i = 0; i < 9 * 4; ++i) {
ItemStack stack = null;
@@ -72,7 +74,7 @@ public class GuiGrid extends GuiContainer {
GL11.glEnable(GL11.GL_DEPTH_TEST);
if (stack != null) {
renderToolTip(stack, mouseX, mouseY);
toolTip = stack;
}
}
@@ -83,6 +85,10 @@ public class GuiGrid extends GuiContainer {
yy += 18;
}
}
if (toolTip != null) {
renderToolTip(toolTip, mouseX, mouseY);
}
}
private int getGridXStart() {