aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-08-08 16:53:46 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-08-08 16:53:46 +0800
commit10fa4cea1da644efe5b3045d3159a3eebdb8c0a8 (patch)
tree0e8f504b66391d6762d526c0e7cdd94c3cb6022f /src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
parent6464acb0a7fe98ab30f9419e6aa95bdd1e92bc74 (diff)
downloadRoughlyEnoughItems-10fa4cea1da644efe5b3045d3159a3eebdb8c0a8.tar.gz
RoughlyEnoughItems-10fa4cea1da644efe5b3045d3159a3eebdb8c0a8.tar.bz2
RoughlyEnoughItems-10fa4cea1da644efe5b3045d3159a3eebdb8c0a8.zip
Using fiber as a config lib
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
index 8a0b9c4e9..a39667f25 100644
--- a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
+++ b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
@@ -15,6 +15,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.zeroeightsix.fiber.exception.FiberException;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.Element;
import net.minecraft.client.gui.screen.Screen;
@@ -53,10 +54,10 @@ public class PreRecipeViewingScreen extends Screen {
this.widgets.add(new ButtonWidget(width / 2 - 100, height - 40, 200, 20, I18n.translate("text.rei.select")) {
@Override
public void onPressed() {
- RoughlyEnoughItemsCore.getConfigManager().getConfig().screenType = original ? RecipeScreenType.ORIGINAL : RecipeScreenType.VILLAGER;
+ RoughlyEnoughItemsCore.getConfigManager().getConfig().setRecipeScreenType(original ? RecipeScreenType.ORIGINAL : RecipeScreenType.VILLAGER);
try {
RoughlyEnoughItemsCore.getConfigManager().saveConfig();
- } catch (IOException e) {
+ } catch (IOException | FiberException e) {
e.printStackTrace();
}
ClientHelper.getInstance().openRecipeViewingScreen(map);