From 69e6df584839c4b307e969ee9e6d4f630c916cd3 Mon Sep 17 00:00:00 2001 From: slprime <31038811+slprime@users.noreply.github.com> Date: Sun, 19 Oct 2025 20:56:23 +0300 Subject: [PATCH 1/2] Fix Button Texture (#771) --- src/main/java/codechicken/nei/LayoutManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/codechicken/nei/LayoutManager.java b/src/main/java/codechicken/nei/LayoutManager.java index bae76d38..c6cf4fa0 100644 --- a/src/main/java/codechicken/nei/LayoutManager.java +++ b/src/main/java/codechicken/nei/LayoutManager.java @@ -907,6 +907,9 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH final int ty2 = ty + 20 - h2 - te; final int tx2 = 200 - w2 - te; + final boolean is2DTexture = GL11.glGetBoolean(GL11.GL_TEXTURE_2D); + + GL11.glEnable(GL11.GL_TEXTURE_2D); changeTexture("textures/gui/widgets.png"); drawTexturedModalRect(x, y, tx1, ty1, w1, h1); // top left drawTexturedModalRect(x, y2, tx1, ty2, w1, h2); // bottom left @@ -919,6 +922,8 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH drawTexturedModalRect(x2, y, tx2, ty1, w2, h1); // top right drawTexturedModalRect(x2, y2, tx2, ty2, w2, h2); // bottom right + + if (!is2DTexture) GL11.glDisable(GL11.GL_TEXTURE_2D); } public static void drawItemPresenceOverlay(int slotX, int slotY, boolean isPresent, boolean slotHighlight) { From d90a667f689cbdd3842cab5007f3fbeedd0ac668 Mon Sep 17 00:00:00 2001 From: slprime <31038811+slprime@users.noreply.github.com> Date: Sun, 19 Oct 2025 21:33:46 +0300 Subject: [PATCH 2/2] Fix Bookmarks Chain Tooltip Height (#773) --- .../nei/recipe/chain/RecipeChainTooltipLineHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/codechicken/nei/recipe/chain/RecipeChainTooltipLineHandler.java b/src/main/java/codechicken/nei/recipe/chain/RecipeChainTooltipLineHandler.java index beee09fa..6d33dc3b 100644 --- a/src/main/java/codechicken/nei/recipe/chain/RecipeChainTooltipLineHandler.java +++ b/src/main/java/codechicken/nei/recipe/chain/RecipeChainTooltipLineHandler.java @@ -208,6 +208,8 @@ public class RecipeChainTooltipLineHandler implements ITooltipLineHandler { this.available.setLabelColor(EnumChatFormatting.GREEN); } + this.size.height = this.size.width = 0; + if (!this.inputs.isEmpty() || !this.outputs.isEmpty() || !this.remainder.isEmpty() || !this.available.isEmpty()) { @@ -225,8 +227,6 @@ public class RecipeChainTooltipLineHandler implements ITooltipLineHandler { this.size.height += this.inputs.getSize().height + this.outputs.getSize().height + this.remainder.getSize().height + this.available.getSize().height; - } else { - this.size.height = this.size.width = 0; } }