Search in sources :

Example 1 with ServerManagerScreen

use of mathax.client.gui.screens.servermanager.ServerManagerScreen in project Client by MatHax.

the class MultiplayerScreenMixin method onInit.

@Inject(method = "init", at = @At("TAIL"))
private void onInit(CallbackInfo info) {
    Version.UpdateChecker.checkForLatest = true;
    addDrawableChild(new ButtonWidget(width - 77, 2, 75, 20, new LiteralText("Accounts"), button -> client.setScreen(GuiThemes.get().accountsScreen())));
    addDrawableChild(new ButtonWidget(width - 154, 2, 75, 20, new LiteralText("Proxies"), button -> client.setScreen(GuiThemes.get().proxiesScreen())));
    addDrawableChild(new ButtonWidget(width - 231, 2, 75, 20, new LiteralText("Servers"), button -> client.setScreen(new ServerManagerScreen(GuiThemes.get(), (MultiplayerScreen) client.currentScreen))));
    if (LastServerInfo.getLastServer() != null)
        addDrawableChild(new ButtonWidget(width / 2 - 154, 10, 100, 20, new LiteralText("Last Server"), button -> LastServerInfo.reconnect(client.currentScreen)));
}
Also used : LiteralText(net.minecraft.text.LiteralText) Inject(org.spongepowered.asm.mixin.injection.Inject) IMultiplayerScreen(mathax.client.mixininterface.IMultiplayerScreen) Color(mathax.client.utils.render.color.Color) Version(mathax.client.utils.Version) ServerInfo(net.minecraft.client.network.ServerInfo) CallbackInfo(org.spongepowered.asm.mixin.injection.callback.CallbackInfo) Mixin(org.spongepowered.asm.mixin.Mixin) Proxies(mathax.client.systems.proxies.Proxies) NameProtect(mathax.client.systems.modules.misc.NameProtect) LastServerInfo(mathax.client.utils.misc.LastServerInfo) At(org.spongepowered.asm.mixin.injection.At) Utils(mathax.client.utils.Utils) MatHax(mathax.client.MatHax) Proxy(mathax.client.systems.proxies.Proxy) GuiThemes(mathax.client.gui.GuiThemes) MultiplayerServerListWidget(net.minecraft.client.gui.screen.multiplayer.MultiplayerServerListWidget) MatrixStack(net.minecraft.client.util.math.MatrixStack) ButtonWidget(net.minecraft.client.gui.widget.ButtonWidget) Screen(net.minecraft.client.gui.screen.Screen) ServerManagerScreen(mathax.client.gui.screens.servermanager.ServerManagerScreen) MultiplayerScreen(net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen) Modules(mathax.client.systems.modules.Modules) Shadow(org.spongepowered.asm.mixin.Shadow) Text(net.minecraft.text.Text) IMultiplayerScreen(mathax.client.mixininterface.IMultiplayerScreen) MultiplayerScreen(net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen) ServerManagerScreen(mathax.client.gui.screens.servermanager.ServerManagerScreen) ButtonWidget(net.minecraft.client.gui.widget.ButtonWidget) LiteralText(net.minecraft.text.LiteralText) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

MatHax (mathax.client.MatHax)1 GuiThemes (mathax.client.gui.GuiThemes)1 ServerManagerScreen (mathax.client.gui.screens.servermanager.ServerManagerScreen)1 IMultiplayerScreen (mathax.client.mixininterface.IMultiplayerScreen)1 Modules (mathax.client.systems.modules.Modules)1 NameProtect (mathax.client.systems.modules.misc.NameProtect)1 Proxies (mathax.client.systems.proxies.Proxies)1 Proxy (mathax.client.systems.proxies.Proxy)1 Utils (mathax.client.utils.Utils)1 Version (mathax.client.utils.Version)1 LastServerInfo (mathax.client.utils.misc.LastServerInfo)1 Color (mathax.client.utils.render.color.Color)1 Screen (net.minecraft.client.gui.screen.Screen)1 MultiplayerScreen (net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen)1 MultiplayerServerListWidget (net.minecraft.client.gui.screen.multiplayer.MultiplayerServerListWidget)1 ButtonWidget (net.minecraft.client.gui.widget.ButtonWidget)1 ServerInfo (net.minecraft.client.network.ServerInfo)1 MatrixStack (net.minecraft.client.util.math.MatrixStack)1 LiteralText (net.minecraft.text.LiteralText)1 Text (net.minecraft.text.Text)1