From 96f3da8557a75fed02092e26a577b90f4ff58efd Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Sat, 29 May 2021 14:40:26 -0300 Subject: [PATCH] update fabric --- viafabric-mc117/build.gradle.kts | 8 ++++---- .../com/viaversion/fabric/mc117/gui/ViaConfigScreen.java | 8 ++++---- .../mc117/mixin/gui/client/MixinMultiplayerScreen.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/viafabric-mc117/build.gradle.kts b/viafabric-mc117/build.gradle.kts index 2edc5c5..e4f71c7 100644 --- a/viafabric-mc117/build.gradle.kts +++ b/viafabric-mc117/build.gradle.kts @@ -1,9 +1,9 @@ version = rootProject.version dependencies { - minecraft("com.mojang:minecraft:21w20a") - mappings("net.fabricmc:yarn:21w20a+build.2:v2") + minecraft("com.mojang:minecraft:1.17-pre1") + mappings("net.fabricmc:yarn:1.17-pre1+build.9:v2") - modImplementation("net.fabricmc.fabric-api:fabric-api:0.34.5+1.17") - modImplementation("com.terraformersmc:modmenu:2.0.0-beta.4") + modImplementation("net.fabricmc.fabric-api:fabric-api:0.34.8+1.17") + modImplementation("com.terraformersmc:modmenu:2.0.0-beta.5") } diff --git a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/gui/ViaConfigScreen.java b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/gui/ViaConfigScreen.java index 684a4d4..f48a21b 100644 --- a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/gui/ViaConfigScreen.java +++ b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/gui/ViaConfigScreen.java @@ -41,13 +41,13 @@ public class ViaConfigScreen extends Screen { protected void init() { int entries = 0; - this.method_37063(new ButtonWidget(this.width / 2 - 155 + entries % 2 * 160, + this.addDrawableChild(new ButtonWidget(this.width / 2 - 155 + entries % 2 * 160, this.height / 6 + 24 * (entries >> 1), 150, 20, getClientSideText(), this::onClickClientSide)); entries++; - this.method_37063(new ButtonWidget(this.width / 2 - 155 + entries % 2 * 160, + this.addDrawableChild(new ButtonWidget(this.width / 2 - 155 + entries % 2 * 160, this.height / 6 + 24 * (entries >> 1), 150, 20, getHideViaButtonText(), this::onHideViaButton)); @@ -65,14 +65,14 @@ public class ViaConfigScreen extends Screen { int clientSideVersion = ViaFabric.config.getClientSideVersion(); protocolVersion.setText(ProtocolUtils.getProtocolName(clientSideVersion)); - this.method_37063(protocolVersion); + this.addDrawableChild(protocolVersion); //noinspection ConstantConditions if (entries % 2 == 1) { entries++; } - this.method_37063(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 24 * (entries >> 1), 200, 20, ScreenTexts.DONE, (buttonWidget) -> this.client.openScreen(this.parent))); + this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 24 * (entries >> 1), 200, 20, ScreenTexts.DONE, (buttonWidget) -> this.client.openScreen(this.parent))); } private void onChangeVersionField(String text) { diff --git a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/mixin/gui/client/MixinMultiplayerScreen.java b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/mixin/gui/client/MixinMultiplayerScreen.java index f907abd..4c9bc0d 100644 --- a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/mixin/gui/client/MixinMultiplayerScreen.java +++ b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/mixin/gui/client/MixinMultiplayerScreen.java @@ -33,6 +33,6 @@ public abstract class MixinMultiplayerScreen extends Screen { it -> MinecraftClient.getInstance().openScreen(new ViaConfigScreen(this)), new TranslatableText("gui.via_button")); if (ViaFabric.config.isHideButton()) enableClientSideViaVersion.visible = false; - this.method_37063(enableClientSideViaVersion); + this.addDrawableChild(enableClientSideViaVersion); } }