diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-03-07 22:21:06 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-03-07 22:21:06 +0800 |
| commit | 8cd1f1a9804f980c1666079c99bafb6330c77723 (patch) | |
| tree | 449f74c31bf73a4106b2cb9bc7fb5635925b2328 /src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java | |
| parent | e5909b2fa40428d2a25a4f727a49a4f4fc47ad01 (diff) | |
| download | RoughlyEnoughItems-8cd1f1a9804f980c1666079c99bafb6330c77723.tar.gz RoughlyEnoughItems-8cd1f1a9804f980c1666079c99bafb6330c77723.tar.bz2 RoughlyEnoughItems-8cd1f1a9804f980c1666079c99bafb6330c77723.zip | |
Config with comments
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java index 541940375..2948870f7 100644 --- a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java @@ -263,12 +263,12 @@ public class RecipeViewingScreen extends Screen { if (selectedCategory.getDisplaySettings().getFixedRecipesPerPage() > 0) return selectedCategory.getDisplaySettings().getFixedRecipesPerPage() - 1; int height = selectedCategory.getDisplayHeight(); - return MathHelper.clamp(MathHelper.floor(((double) largestHeight - 40d) / ((double) height + 7d)) - 1, 0, Math.min(RoughlyEnoughItemsCore.getConfigHelper().getConfig().maxRecipePerPage - 1, selectedCategory.getMaximumRecipePerPage() - 1)); + return MathHelper.clamp(MathHelper.floor(((double) largestHeight - 40d) / ((double) height + 7d)) - 1, 0, Math.min(RoughlyEnoughItemsCore.getConfigManager().getConfig().maxRecipePerPage - 1, selectedCategory.getMaximumRecipePerPage() - 1)); } private int getRecipesPerPageByHeight() { int height = selectedCategory.getDisplayHeight(); - return MathHelper.clamp(MathHelper.floor(((double) guiHeight - 40d) / ((double) height + 7d)) - 1, 0, Math.min(RoughlyEnoughItemsCore.getConfigHelper().getConfig().maxRecipePerPage - 1, selectedCategory.getMaximumRecipePerPage() - 1)); + return MathHelper.clamp(MathHelper.floor(((double) guiHeight - 40d) / ((double) height + 7d)) - 1, 0, Math.min(RoughlyEnoughItemsCore.getConfigManager().getConfig().maxRecipePerPage - 1, selectedCategory.getMaximumRecipePerPage() - 1)); } @Override |
