Skip to content

Commit 4efbd8e

Browse files
committed
Fix build for 1.18 yarn mappings
1 parent 01ebf39 commit 4efbd8e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/java/io/github/ultimateboomer/resolutioncontrol/ResolutionControlMod.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void onInitialize() {
9494

9595
ClientTickEvents.END_CLIENT_TICK.register(client -> {
9696
while (settingsKey.wasPressed()) {
97-
client.openScreen(SettingsScreen.getScreen(lastSettingsScreen));
97+
client.setScreen(SettingsScreen.getScreen(lastSettingsScreen));
9898
}
9999
});
100100

@@ -129,8 +129,7 @@ && getWindow().getX() != -32000) {
129129
private void saveScreenshot(Framebuffer fb) {
130130
ScreenshotRecorder.saveScreenshot(client.runDirectory,
131131
RCUtil.getScreenshotFilename(client.runDirectory).toString(),
132-
fb.textureWidth, fb.textureHeight, fb,
133-
text -> client.player.sendMessage(text, false));
132+
fb, text -> client.player.sendMessage(text, false));
134133
}
135134

136135
public void setShouldScale(boolean shouldScale) {

src/main/java/io/github/ultimateboomer/resolutioncontrol/client/gui/screen/SettingsScreen.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected void init() {
7676
startX - menuButtonWidth - 20, startY + o.getValue(),
7777
menuButtonWidth, menuButtonHeight,
7878
r.getTitle(),
79-
button -> client.openScreen(constructor.apply(this.parent))
79+
button -> client.setScreen(constructor.apply(this.parent))
8080
);
8181

8282
if (this.getClass().equals(c))
@@ -94,7 +94,7 @@ protected void init() {
9494
new TranslatableText("gui.done"),
9595
button -> {
9696
applySettingsAndCleanup();
97-
client.openScreen(this.parent);
97+
client.setScreen(this.parent);
9898
}
9999
);
100100
this.addDrawableChild(doneButton);
@@ -132,7 +132,7 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
132132
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
133133
if ((ResolutionControlMod.getInstance().getSettingsKey().matchesKey(keyCode, scanCode))) {
134134
this.applySettingsAndCleanup();
135-
this.client.openScreen(this.parent);
135+
this.client.setScreen(this.parent);
136136
this.client.mouse.lockCursor();
137137
return true;
138138
} else {

0 commit comments

Comments
 (0)