update fabric

This commit is contained in:
creeper123123321 2021-05-29 14:40:26 -03:00
parent 2ec65bb116
commit 96f3da8557
3 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,9 @@
version = rootProject.version version = rootProject.version
dependencies { dependencies {
minecraft("com.mojang:minecraft:21w20a") minecraft("com.mojang:minecraft:1.17-pre1")
mappings("net.fabricmc:yarn:21w20a+build.2:v2") mappings("net.fabricmc:yarn:1.17-pre1+build.9:v2")
modImplementation("net.fabricmc.fabric-api:fabric-api:0.34.5+1.17") modImplementation("net.fabricmc.fabric-api:fabric-api:0.34.8+1.17")
modImplementation("com.terraformersmc:modmenu:2.0.0-beta.4") modImplementation("com.terraformersmc:modmenu:2.0.0-beta.5")
} }

View File

@ -41,13 +41,13 @@ public class ViaConfigScreen extends Screen {
protected void init() { protected void init() {
int entries = 0; 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), this.height / 6 + 24 * (entries >> 1),
150, 150,
20, getClientSideText(), this::onClickClientSide)); 20, getClientSideText(), this::onClickClientSide));
entries++; 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), this.height / 6 + 24 * (entries >> 1),
150, 150,
20, getHideViaButtonText(), this::onHideViaButton)); 20, getHideViaButtonText(), this::onHideViaButton));
@ -65,14 +65,14 @@ public class ViaConfigScreen extends Screen {
int clientSideVersion = ViaFabric.config.getClientSideVersion(); int clientSideVersion = ViaFabric.config.getClientSideVersion();
protocolVersion.setText(ProtocolUtils.getProtocolName(clientSideVersion)); protocolVersion.setText(ProtocolUtils.getProtocolName(clientSideVersion));
this.method_37063(protocolVersion); this.addDrawableChild(protocolVersion);
//noinspection ConstantConditions //noinspection ConstantConditions
if (entries % 2 == 1) { if (entries % 2 == 1) {
entries++; 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) { private void onChangeVersionField(String text) {

View File

@ -33,6 +33,6 @@ public abstract class MixinMultiplayerScreen extends Screen {
it -> MinecraftClient.getInstance().openScreen(new ViaConfigScreen(this)), it -> MinecraftClient.getInstance().openScreen(new ViaConfigScreen(this)),
new TranslatableText("gui.via_button")); new TranslatableText("gui.via_button"));
if (ViaFabric.config.isHideButton()) enableClientSideViaVersion.visible = false; if (ViaFabric.config.isHideButton()) enableClientSideViaVersion.visible = false;
this.method_37063(enableClientSideViaVersion); this.addDrawableChild(enableClientSideViaVersion);
} }
} }