aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2019-11-15 20:09:15 +0800
committershedaniel <daniel@shedaniel.me>2019-11-15 20:09:15 +0800
commitb7246fa0016888fd52c45f9c77df46f9d791e326 (patch)
treeca455d73ea2213ef6e5a62855834119715a13fe2 /src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
parent5c34cd8dae4879e04fd825f423e0ddbf8480668e (diff)
downloadRoughlyEnoughItems-b7246fa0016888fd52c45f9c77df46f9d791e326.tar.gz
RoughlyEnoughItems-b7246fa0016888fd52c45f9c77df46f9d791e326.tar.bz2
RoughlyEnoughItems-b7246fa0016888fd52c45f9c77df46f9d791e326.zip
Using more of the API instead of the Impl
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
index 3c840d676..4e1e98700 100644
--- a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
+++ b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
@@ -9,7 +9,6 @@ import com.google.common.collect.Lists;
import com.mojang.blaze3d.systems.RenderSystem;
import me.shedaniel.math.api.Rectangle;
import me.shedaniel.math.impl.PointHelper;
-import me.shedaniel.rei.RoughlyEnoughItemsCore;
import me.shedaniel.rei.api.*;
import me.shedaniel.rei.gui.widget.*;
import me.shedaniel.rei.impl.ScreenHelper;
@@ -294,7 +293,7 @@ public class RecipeViewingScreen extends Screen {
else
recipeChoosePageWidget = null;
- List<List<EntryStack>> workingStations = RoughlyEnoughItemsCore.getRecipeHelper().getWorkingStations(selectedCategory.getIdentifier());
+ List<List<EntryStack>> workingStations = RecipeHelper.getInstance().getWorkingStations(selectedCategory.getIdentifier());
if (!workingStations.isEmpty()) {
int hh = MathHelper.floor((bounds.height - 16) / 18f);
int actualHeight = Math.min(hh, workingStations.size());
@@ -353,12 +352,12 @@ public class RecipeViewingScreen extends Screen {
if (selectedCategory.getFixedRecipesPerPage() > 0)
return selectedCategory.getFixedRecipesPerPage() - 1;
int height = selectedCategory.getDisplayHeight();
- return MathHelper.clamp(MathHelper.floor(((double) largestHeight - 40d) / ((double) height + 7d)) - 1, 0, Math.min(RoughlyEnoughItemsCore.getConfigManager().getConfig().getMaxRecipePerPage() - 1, selectedCategory.getMaximumRecipePerPage() - 1));
+ return MathHelper.clamp(MathHelper.floor(((double) largestHeight - 40d) / ((double) height + 7d)) - 1, 0, Math.min(ConfigManager.getInstance().getConfig().getMaxRecipePerPage() - 1, selectedCategory.getMaximumRecipePerPage() - 1));
}
private int getRecipesPerPageByHeight() {
int height = selectedCategory.getDisplayHeight();
- return MathHelper.clamp(MathHelper.floor(((double) guiHeight - 40d) / ((double) height + 7d)), 0, Math.min(RoughlyEnoughItemsCore.getConfigManager().getConfig().getMaxRecipePerPage() - 1, selectedCategory.getMaximumRecipePerPage() - 1));
+ return MathHelper.clamp(MathHelper.floor(((double) guiHeight - 40d) / ((double) height + 7d)), 0, Math.min(ConfigManager.getInstance().getConfig().getMaxRecipePerPage() - 1, selectedCategory.getMaximumRecipePerPage() - 1));
}
@Override