From 997b1562e57b4bcf49d698d045808333682d87b4 Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Wed, 1 Oct 2025 22:58:40 +0200 Subject: [PATCH] sa + import fix + deps --- dependencies.gradle | 2 +- .../nei/recipe/RecipeTooltipLineHandler.java | 25 +++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 2f02345f..cb4cac2e 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -2,7 +2,7 @@ dependencies { api('com.github.GTNewHorizons:CodeChickenCore:1.4.7:dev') - implementation('com.github.GTNewHorizons:GTNHLib:0.6.40:dev') + implementation('com.github.GTNewHorizons:GTNHLib:0.7.0:dev') shadowImplementation('org.apache.commons:commons-csv:1.10.0') diff --git a/src/main/java/codechicken/nei/recipe/RecipeTooltipLineHandler.java b/src/main/java/codechicken/nei/recipe/RecipeTooltipLineHandler.java index f5cdaacd..fbc88c14 100644 --- a/src/main/java/codechicken/nei/recipe/RecipeTooltipLineHandler.java +++ b/src/main/java/codechicken/nei/recipe/RecipeTooltipLineHandler.java @@ -1,10 +1,14 @@ package codechicken.nei.recipe; import java.awt.Dimension; +import java.util.List; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; import codechicken.lib.gui.GuiDraw; import codechicken.lib.gui.GuiDraw.ITooltipLineHandler; @@ -99,17 +103,18 @@ public class RecipeTooltipLineHandler implements ITooltipLineHandler { GL11.glDisable(GL11.GL_DEPTH_TEST); List slots = this.gui.slotcontainer.inventorySlots; - GuiDraw.drawRect(BG_PADDING, BG_PADDING, size.width - BG_PADDING * 2, 12, 0x30000000); - GuiDraw.drawStringC(this.recipeName, this.widget.w / 2, BG_PADDING + 2, 0xffffff); + GuiDraw.drawRect(BG_PADDING, BG_PADDING, size.width - BG_PADDING * 2, 12, 0x30000000); + GuiDraw.drawStringC(this.recipeName, this.widget.w / 2, BG_PADDING + 2, 0xffffff); - GuiHelper.useScissor( - this.widget.x, - this.widget.y, - this.widget.w, - this.widget.h, - () -> { this.widget.draw(0, 0); }); + GuiHelper.useScissor( + this.widget.x, + this.widget.y, + this.widget.w, + this.widget.h, + () -> { this.widget.draw(0, 0); }); + + GL11.glPopAttrib(); + } - GL11.glPopAttrib(); } - }