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
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")
}

View File

@ -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) {

View File

@ -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);
}
}