Merge pull request #5 from lixfel/chaoscaot/1.19.3

AltAuth 1.19.3 Support
Dieser Commit ist enthalten in:
lixfel 2022-12-08 13:15:17 +01:00 committet von GitHub
Commit 0a91d72fc7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 13 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -10,6 +10,8 @@ import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.screen.ScreenTexts;
import net.minecraft.text.Text;
import java.util.function.Supplier;
public class TrustServerScreen extends ConfirmScreen {
private static final Text FORCE_MOJANG = Text.translatable("gui.altauth.confirm.force_mojang");
private static final Text TRUST_ONCE = Text.translatable("gui.altauth.confirm.once");
@ -25,24 +27,22 @@ public class TrustServerScreen extends ConfirmScreen {
@Override
protected void addButtons(int y) {
this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, y, 150, 20, this.yesText, (button) -> {
this.addDrawableChild(ButtonWidget.builder(this.yesText, button -> {
ClientConfig.INSTANCE.allowedServers.add(server);
ClientConfig.INSTANCE.save();
ConnectScreen.connect(parent, client, AltAuth.address, null);
}));
this.addDrawableChild(new ButtonWidget(this.width / 2 + 5, y, 150, 20, FORCE_MOJANG, (button) -> {
}).dimensions(this.width / 2 - 155, y, 150, 20).build());
this.addDrawableChild(ButtonWidget.builder(FORCE_MOJANG, button -> {
ClientConfig.INSTANCE.forcedMojang.add(AltAuth.address.getAddress());
ClientConfig.INSTANCE.save();
ConnectScreen.connect(parent, client, AltAuth.address, null);
}));
this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, y + 25, 150, 20, TRUST_ONCE, (button) -> {
}).dimensions(this.width / 2 + 5, y, 150, 20).build());
this.addDrawableChild(ButtonWidget.builder(TRUST_ONCE, button -> {
AltAuth.trustOnce = true;
ConnectScreen.connect(parent, client, AltAuth.address, null);
}));
this.addDrawableChild(new ButtonWidget(this.width / 2 + 5, y + 25, 150, 20, this.noText, (button) -> {
client.setScreen(parent);
}));
}).dimensions(this.width / 2 - 155, y + 25, 150, 20).build());
this.addDrawableChild(ButtonWidget.builder(this.noText, button -> client.setScreen(parent)).dimensions(this.width / 2 + 5, y + 25, 150, 20).build());
}
}

Datei anzeigen

@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.ModifyArg;
@Mixin(ConnectScreen.class)
public class ConnectScreenMixin {
@ModifyArg(method = "connect(Lnet/minecraft/client/gui/screen/Screen;Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/network/ServerAddress;Lnet/minecraft/client/network/ServerInfo;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ConnectScreen;connect(Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/network/ServerAddress;)V"), index = 1)
@ModifyArg(method = "connect(Lnet/minecraft/client/gui/screen/Screen;Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/network/ServerAddress;Lnet/minecraft/client/network/ServerInfo;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ConnectScreen;connect(Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/network/ServerAddress;Lnet/minecraft/client/network/ServerInfo;)V"), index = 1)
private static ServerAddress copyServerAddress(ServerAddress address) {
AltAuth.address = address;
return address;

Datei anzeigen

@ -1,8 +1,8 @@
org.gradle.jvmargs=-Xmx1G
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.4
loader_version=0.14.9
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.2
loader_version=0.14.11
version=1.0.0