aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-03-10 02:45:09 +0800
committershedaniel <daniel@shedaniel.me>2020-03-10 02:45:09 +0800
commit0ef7d4d944b0683250f905f856c08e759ae9355d (patch)
tree88376b527c5c86fd24c0bf2b6ad4f740d20cc4d0 /src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
parent5c83be1590d4e1ea706ab7b57d20253f95dcbd1b (diff)
downloadRoughlyEnoughItems-0ef7d4d944b0683250f905f856c08e759ae9355d.tar.gz
RoughlyEnoughItems-0ef7d4d944b0683250f905f856c08e759ae9355d.tar.bz2
RoughlyEnoughItems-0ef7d4d944b0683250f905f856c08e759ae9355d.zip
ScreenWithHandler refractor, why must we suffer
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
index 09a853d6a..e24d91320 100644
--- a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
+++ b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
@@ -38,7 +38,7 @@ import me.shedaniel.rei.impl.ScreenHelper;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.Element;
import net.minecraft.client.gui.screen.Screen;
-import net.minecraft.client.gui.screen.ingame.ContainerScreen;
+import net.minecraft.client.gui.screen.ingame.ScreenWithHandler;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.client.util.NarratorManager;
import net.minecraft.text.TranslatableText;
@@ -125,16 +125,16 @@ public class PreRecipeViewingScreen extends Screen {
@Override
public void render(int int_1, int int_2, float float_1) {
- if (this.minecraft.world != null) {
+ if (this.client.world != null) {
this.fillGradient(0, 0, this.width, this.height, -1072689136, -804253680);
} else {
this.fillGradient(0, 0, this.width, this.height, -16777216, -16777216);
}
- this.drawCenteredString(this.font, this.title.asFormattedString(), this.width / 2, 20, 16777215);
+ this.drawCenteredString(this.textRenderer, this.title.asFormattedString(), this.width / 2, 20, 16777215);
if (showTips) {
int i = 30;
- for (String s : this.font.wrapStringToWidthAsList(I18n.translate("text.rei.recipe_screen_type.selection.sub"), width - 30)) {
- this.drawCenteredString(this.font, Formatting.GRAY.toString() + s, width / 2, i, -1);
+ for (String s : this.textRenderer.wrapStringToWidthAsList(I18n.translate("text.rei.recipe_screen_type.selection.sub"), width - 30)) {
+ this.drawCenteredString(this.textRenderer, Formatting.GRAY.toString() + s, width / 2, i, -1);
i += 10;
}
}
@@ -167,9 +167,9 @@ public class PreRecipeViewingScreen extends Screen {
@Override
public boolean keyPressed(int int_1, int int_2, int int_3) {
- if (int_1 == 256 || this.minecraft.options.keyInventory.matchesKey(int_1, int_2)) {
+ if (int_1 == 256 || this.client.options.keyInventory.matchesKey(int_1, int_2)) {
MinecraftClient.getInstance().openScreen(parent);
- if (parent instanceof ContainerScreen)
+ if (parent instanceof ScreenWithHandler)
ScreenHelper.getLastOverlay().init();
return true;
}