diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-01-03 23:20:31 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-01-03 23:20:31 +0800 |
| commit | 2077ebf086543587c4fc7ca9b125809609f749b9 (patch) | |
| tree | 2d8bbbb075809c4dac0a701de238dfaf4d6b092a /src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java | |
| parent | 3e5c16747b3403cc4cc725676c13ba50f04d3e9b (diff) | |
| download | RoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.tar.gz RoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.tar.bz2 RoughlyEnoughItems-2077ebf086543587c4fc7ca9b125809609f749b9.zip | |
Compact the design and add cooking xp details
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java index 5f9e876e1..87ec9df22 100644 --- a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java @@ -12,6 +12,7 @@ import me.shedaniel.rei.gui.config.RecipeScreenType; import me.shedaniel.rei.gui.widget.ButtonWidget; import me.shedaniel.rei.gui.widget.Widget; import me.shedaniel.rei.gui.widget.WidgetWithBounds; +import me.shedaniel.rei.impl.ClientHelperImpl; import me.shedaniel.rei.impl.ScreenHelper; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.Element; @@ -33,6 +34,7 @@ public class PreRecipeViewingScreen extends Screen { private final List<Widget> widgets; private boolean original; private Map<RecipeCategory<?>, List<RecipeDisplay>> map; + private EntryStack mainStackToNotice = EntryStack.empty(); public PreRecipeViewingScreen(Map<RecipeCategory<?>, List<RecipeDisplay>> map) { super(new TranslatableText("text.rei.recipe_screen_type.selection")); @@ -41,6 +43,10 @@ public class PreRecipeViewingScreen extends Screen { this.map = map; } + public void addMainStackToNotice(EntryStack mainStackToNotice) { + this.mainStackToNotice = mainStackToNotice; + } + @Override protected void init() { this.children.clear(); @@ -50,7 +56,7 @@ public class PreRecipeViewingScreen extends Screen { public void onPressed() { ConfigObject.getInstance().setRecipeScreenType(original ? RecipeScreenType.ORIGINAL : RecipeScreenType.VILLAGER); ConfigManager.getInstance().saveConfig(); - ClientHelper.getInstance().openRecipeViewingScreen(map); + ((ClientHelperImpl) ClientHelper.getInstance()).openRecipeViewingScreen(map, mainStackToNotice); } }); this.widgets.add(new ScreenTypeSelection(width / 2 - 200 - 5, height / 2 - 112 / 2 - 10, 0)); |
