This commit is contained in:
kirillsaint 2023-08-28 15:03:19 +06:00
parent 57c23a03f8
commit 6488914cc1
2 changed files with 5 additions and 12 deletions

View File

@ -37,7 +37,7 @@ public class ServerComponent {
private static final ResourceLocation SERVER_SELECTION_BUTTONS = new ResourceLocation("textures/gui/server_selection.png");
private final SilentMultiplayerGui owner;
private final Minecraft mc;
private ServerData server;
private final ServerData server;
private final ResourceLocation serverIcon;
private String field_148299_g;
private DynamicTexture field_148305_h;
@ -83,11 +83,9 @@ public class ServerComponent {
}
boolean isHovered = MouseUtils.isInside(mouseX, mouseY, x, y, 240, 35);
RenderUtil.drawRoundedOutline(x, y, 240, 35, 3, isSelected ? 3 : 1, isSelected ? -1 : Theme.borderColor().getRGB());
if(isHovered || isSelected) {
if(isHovered) {
RenderUtil.drawRoundedRect(x, y, 240, 35, 3, new Color(255, 255, 255, 30).getRGB());
if(isHovered) {
cursorType = MouseCursorHandler.CursorType.POINTER;
}
cursorType = MouseCursorHandler.CursorType.POINTER;
}
if (this.server.getBase64EncodedIconData() != null && !this.server.getBase64EncodedIconData().equals(this.field_148299_g))
@ -248,10 +246,4 @@ public class ServerComponent {
public ServerData getServer() {
return server;
}
public void setServer(ServerData server) {
if(!server.serverIP.equalsIgnoreCase(this.server.serverIP)) {
this.server = new ServerData(server.serverName, server.serverIP, false);
}
}
}

View File

@ -20,6 +20,7 @@ import net.minecraft.util.Timer;
import net.minecraft.world.WorldSettings;
import net.silentclient.client.Client;
import net.silentclient.client.event.impl.*;
import net.silentclient.client.gui.SilentScreen;
import net.silentclient.client.gui.lite.LiteMainMenu;
import net.silentclient.client.gui.multiplayer.SilentMultiplayerGui;
import net.silentclient.client.gui.silentmainmenu.MainMenuConcept;
@ -151,7 +152,7 @@ public abstract class MinecraftMixin implements MinecraftExt {
displayGuiScreen(new net.silentclient.client.gui.minecraft.GuiIngameMenu());
return;
}
if(guiScreenIn != null) {
if(guiScreenIn != null && guiScreenIn instanceof SilentScreen) {
Client.logger.info("Opening menu: " + guiScreenIn.getClass().toString());
}
}