Skip to content

Commit

Permalink
sa
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master committed Jul 5, 2023
1 parent de75b95 commit bc623ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/codechicken/nei/recipe/GuiRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -783,12 +783,14 @@ private int getRecipesPerPage(HandlerInfo handlerInfo) {
}

public Point getRecipePosition(int recipe) {
// Legacy recipe handlers using the height hack might use getRecipePosition in combination with guiTop/height to
// Legacy recipe handlers using the height hack might use getRecipePosition in combination with guiTop/height to
// position certain elements like tooltips. Since guiTop is moved down by 16px during height hacking, we need to
// reduce the vertical shift here to 16px instead of 32px.
return new Point(
5,
(isHeightHackApplied ? 16 : 32) - (limitToOneRecipe ? 25 : 0) + yShift + ((recipe % getRecipesPerPage()) * handlerInfo.getHeight()));
(isHeightHackApplied ? 16 : 32) - (limitToOneRecipe ? 25 : 0)
+ yShift
+ ((recipe % getRecipesPerPage()) * handlerInfo.getHeight()));
}

public abstract ArrayList<H> getCurrentRecipeHandlers();
Expand Down

0 comments on commit bc623ec

Please sign in to comment.