aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-02-05 21:55:26 +0800
committershedaniel <daniel@shedaniel.me>2021-02-05 21:55:26 +0800
commitdc92d0a4d262b633e9f322def3e89ab1a05417ab (patch)
tree75d51513b5d930f0456959c6034ba02e21cf12d5 /runtime/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
parentea634e7ba29146d4ebc2c05b61257fa6c3b0642e (diff)
downloadRoughlyEnoughItems-dc92d0a4d262b633e9f322def3e89ab1a05417ab.tar.gz
RoughlyEnoughItems-dc92d0a4d262b633e9f322def3e89ab1a05417ab.tar.bz2
RoughlyEnoughItems-dc92d0a4d262b633e9f322def3e89ab1a05417ab.zip
More
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'runtime/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java')
-rw-r--r--runtime/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java b/runtime/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
index 8643922bb..fd282ae55 100644
--- a/runtime/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
+++ b/runtime/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
@@ -33,14 +33,17 @@ import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
import me.shedaniel.math.impl.PointHelper;
import me.shedaniel.rei.api.*;
+import me.shedaniel.rei.api.ingredient.EntryIngredient;
import me.shedaniel.rei.api.ingredient.EntryStack;
-import me.shedaniel.rei.api.registry.category.DisplayCategory;
-import me.shedaniel.rei.api.widgets.Button;
-import me.shedaniel.rei.api.widgets.Tooltip;
-import me.shedaniel.rei.api.widgets.Widgets;
-import me.shedaniel.rei.gui.entries.DisplayRenderer;
+import me.shedaniel.rei.api.registry.CategoryRegistry;
+import me.shedaniel.rei.api.registry.display.Display;
+import me.shedaniel.rei.api.registry.display.DisplayCategory;
+import me.shedaniel.rei.api.gui.widgets.Button;
+import me.shedaniel.rei.api.gui.widgets.Tooltip;
+import me.shedaniel.rei.api.gui.widgets.Widgets;
+import me.shedaniel.rei.api.gui.DisplayRenderer;
import me.shedaniel.rei.gui.widget.TabWidget;
-import me.shedaniel.rei.gui.widget.Widget;
+import me.shedaniel.rei.api.gui.widgets.Widget;
import me.shedaniel.rei.impl.ClientHelperImpl;
import me.shedaniel.rei.impl.InternalWidgets;
import me.shedaniel.rei.impl.ScreenHelper;
@@ -158,7 +161,7 @@ public class VillagerRecipeViewingScreen extends Screen implements RecipeScreen
}
this.bounds = new Rectangle(width / 2 - guiWidth / 2, height / 2 - guiHeight / 2, guiWidth, guiHeight);
- List<List<? extends EntryStack<?>>> workingStations = RecipeRegistry.getInstance().getWorkingStations(category.getIdentifier());
+ List<EntryIngredient> workingStations = CategoryRegistry.getInstance().getWorkingStations(category.getIdentifier());
if (!workingStations.isEmpty()) {
int ww = Mth.floor((bounds.width - 16) / 18f);
int w = Math.min(ww, workingStations.size());
@@ -168,7 +171,7 @@ public class VillagerRecipeViewingScreen extends Screen implements RecipeScreen
widgets.add(Widgets.createCategoryBase(new Rectangle(xx - 5, bounds.y + bounds.height - 5, 10 + w * 16, 12 + h * 16)));
widgets.add(Widgets.createSlotBase(new Rectangle(xx - 1, yy - 1, 2 + w * 16, 2 + h * 16)));
int index = 0;
- for (List<? extends EntryStack<?>> workingStation : workingStations) {
+ for (EntryIngredient workingStation : workingStations) {
widgets.add(new RecipeViewingScreen.WorkstationSlotWidget(xx, yy, workingStation));
index++;
xx += 16;