From bd6384bf244314460e1eca001b2615eaadb14faf Mon Sep 17 00:00:00 2001 From: slprime <31038811+slprime@users.noreply.github.com> Date: Wed, 29 Oct 2025 09:52:33 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A1alculate=20the=20height=20of=20the=20cont?= =?UTF-8?q?ainer=20before=20scrolling=20to=20the=20recipe=20(#782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: sisyphussy <221229741+sisyphussy@users.noreply.github.com> --- src/main/java/codechicken/nei/recipe/GuiRecipe.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/codechicken/nei/recipe/GuiRecipe.java b/src/main/java/codechicken/nei/recipe/GuiRecipe.java index 49f68a6a..05134142 100644 --- a/src/main/java/codechicken/nei/recipe/GuiRecipe.java +++ b/src/main/java/codechicken/nei/recipe/GuiRecipe.java @@ -322,6 +322,10 @@ public abstract class GuiRecipe extends GuiContainer i } }; + this.container.x = this.guiLeft + 3; + this.container.y = this.guiTop + 32; + this.container.h = this.ySize - 32 - 5; + GuiRecipe.toggleSearch.icon = new DrawableBuilder("nei:textures/nei_sprites.png", 0, 76, 10, 10).build(); GuiRecipe.toggleSearch.w = GuiRecipe.toggleSearch.h = 12; GuiRecipe.toggleSearch.x = this.guiLeft + BORDER_PADDING + BUTTON_WIDTH; @@ -698,11 +702,7 @@ public abstract class GuiRecipe extends GuiContainer i public void updateScreen() { super.updateScreen(); - this.container.x = this.guiLeft + 3; - this.container.y = this.guiTop + 32; - this.container.w = Math.max(this.xSize - 6, this.handlerInfo.getWidth()); - this.container.h = this.ySize - 32 - 5; this.handler.original.onUpdate(); refreshPage();