Skip to content

Commit e3f4cdd

Browse files
committed
java 17 is no fun
1 parent 2d6d381 commit e3f4cdd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/fast_reset/client/mixin/GameMenuMixin.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected GameMenuMixin(Text title) {
2121

2222
@Redirect(method = "initWidgets", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/widget/GridWidget$Adder;add(Lnet/minecraft/client/gui/widget/ClickableWidget;I)Lnet/minecraft/client/gui/widget/ClickableWidget;"))
2323
private <T extends ClickableWidget> T addButtons(GridWidget.Adder instance, T widget, int occupiedColumns) {
24-
final ButtonWidget.Builder saveButton = ButtonWidget.builder(Text.translatable("menu.quitWorld"), (buttonWidgetX) -> {
24+
@SuppressWarnings("NoTranslation") final ButtonWidget.Builder saveButton = ButtonWidget.builder(Text.translatable("menu.quitWorld"), (buttonWidgetX) -> {
2525
Client.saveOnQuit = false;
2626
this.disconnect();
2727
Client.saveOnQuit = true;
@@ -34,9 +34,9 @@ private <T extends ClickableWidget> T addButtons(GridWidget.Adder instance, T wi
3434
}
3535

3636
int height = 20;
37-
int width;
38-
int x;
39-
int y;
37+
int width = 0;
38+
int x = 0;
39+
int y = 0;
4040
switch (Client.buttonLocation) {
4141
// bottom right build
4242
case 0 -> {
@@ -45,7 +45,7 @@ private <T extends ClickableWidget> T addButtons(GridWidget.Adder instance, T wi
4545
y = this.height - height - 4;
4646
}
4747
// center build
48-
case 1, default -> {
48+
case 1 -> {
4949
width = 204;
5050
x = this.width / 2 - width / 2;
5151
y = this.height / 4 + 148 - height;

0 commit comments

Comments
 (0)