From e383c398840d5def4764c5ea9e748e3a3aeae25b Mon Sep 17 00:00:00 2001 From: Wilhelm Schuster Date: Sun, 16 Jul 2023 22:19:14 +0200 Subject: [PATCH] Fix overlay button y offsets --- src/main/java/codechicken/nei/recipe/GuiRecipe.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/codechicken/nei/recipe/GuiRecipe.java b/src/main/java/codechicken/nei/recipe/GuiRecipe.java index a90c4d00..71cf6d73 100644 --- a/src/main/java/codechicken/nei/recipe/GuiRecipe.java +++ b/src/main/java/codechicken/nei/recipe/GuiRecipe.java @@ -265,13 +265,14 @@ public abstract class GuiRecipe extends GuiContainer i final int recipesPerPage = getRecipesPerPage(); overlayButtons = new GuiButton[recipesPerPage]; final int xOffset = limitToOneRecipe ? ((xSize / 2) - 2) : (width / 2); + final int yOffset = limitToOneRecipe ? 0 : guiTop - 18; final String overlayKeyName = NEIClientConfig .getKeyName(NEIClientConfig.getKeyBinding("gui.overlay_use"), true); for (int i = 0; i < recipesPerPage; i++) { overlayButtons[i] = new GuiNEIButton( OVERLAY_BUTTON_ID_START + i, xOffset + 65, - 16 + (handlerInfo.getHeight() * (i + 1)) - 2, + yOffset + getRecipePosition(i).y + handlerInfo.getHeight(), buttonWidth, buttonHeight, "?");