From d3e0c6c020031c900953a04ca1f0efaadd76e2b5 Mon Sep 17 00:00:00 2001 From: sisyphussy Date: Sun, 12 Oct 2025 21:19:01 +0200 Subject: [PATCH 1/2] fix tooltip lighting --- .../codechicken/nei/ItemsTooltipLineHandler.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/codechicken/nei/ItemsTooltipLineHandler.java b/src/main/java/codechicken/nei/ItemsTooltipLineHandler.java index 8dfc2c6c..37aaf0cf 100644 --- a/src/main/java/codechicken/nei/ItemsTooltipLineHandler.java +++ b/src/main/java/codechicken/nei/ItemsTooltipLineHandler.java @@ -92,6 +92,7 @@ public class ItemsTooltipLineHandler implements ITooltipLineHandler { this.labelColor = color; } + @Override public void draw(int x, int y) { if (this.length == 0) return; @@ -100,13 +101,15 @@ public class ItemsTooltipLineHandler implements ITooltipLineHandler { fontRenderer.drawStringWithShadow(this.labelColor + this.label + ":", x, y, 0); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glPushAttrib(GL11.GL_ENABLE_BIT | GL11.GL_COLOR_BUFFER_BIT | GL11.GL_LIGHTING_BIT); - GL11.glPushMatrix(); RenderHelper.enableGUIStandardItemLighting(); - GL11.glScaled(1, 1, 3); - GL11.glTranslatef(x, y + fontRenderer.FONT_HEIGHT + 2, 0); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); + final int xTranslation = x; + final int yTranslation = y + fontRenderer.FONT_HEIGHT + 2; + final int zTranslation = 400; + GL11.glTranslatef(xTranslation, yTranslation, zTranslation); int indexShift = 0; @@ -142,7 +145,7 @@ public class ItemsTooltipLineHandler implements ITooltipLineHandler { }); } - GL11.glPopMatrix(); + GL11.glTranslatef(-xTranslation, -yTranslation, -zTranslation); GL11.glPopAttrib(); } From 9e583e7837c6120748697a2b035f2751c3dd2e3c Mon Sep 17 00:00:00 2001 From: sisyphussy Date: Sun, 12 Oct 2025 21:26:26 +0200 Subject: [PATCH 2/2] sa --- src/main/java/codechicken/nei/ItemsTooltipLineHandler.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/codechicken/nei/ItemsTooltipLineHandler.java b/src/main/java/codechicken/nei/ItemsTooltipLineHandler.java index 37aaf0cf..0e20ea65 100644 --- a/src/main/java/codechicken/nei/ItemsTooltipLineHandler.java +++ b/src/main/java/codechicken/nei/ItemsTooltipLineHandler.java @@ -92,7 +92,6 @@ public class ItemsTooltipLineHandler implements ITooltipLineHandler { this.labelColor = color; } - @Override public void draw(int x, int y) { if (this.length == 0) return;