Skip to content

Commit

Permalink
Allow recipes of height 60px (standard tank height) to fit two-per-page
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed May 1, 2016
1 parent 713d9c5 commit eee16af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/mezz/jei/gui/RecipesGui.java
Expand Up @@ -39,6 +39,7 @@

public class RecipesGui extends GuiScreen implements IRecipesGui, IShowsRecipeFocuses {
private static final int borderPadding = 6;
private static final int innerPadding = 5;
private static final int textPadding = 5;
private static final int buttonWidth = 13;
private static final int buttonHeight = 12;
Expand Down Expand Up @@ -435,7 +436,7 @@ private void updateLayout() {

IDrawable recipeBackground = recipeCategory.getBackground();

final int recipesPerPage = Math.max(1, (ySize - headerHeight) / (recipeBackground.getHeight() + borderPadding));
final int recipesPerPage = Math.max(1, (ySize - headerHeight) / (recipeBackground.getHeight() + innerPadding));
final int recipeXOffset = guiLeft + (xSize - recipeBackground.getWidth()) / 2;
final int recipeSpacing = (ySize - headerHeight - (recipesPerPage * recipeBackground.getHeight())) / (recipesPerPage + 1);

Expand Down

0 comments on commit eee16af

Please sign in to comment.