This commit is contained in:
kirillsaint 2023-07-22 04:57:02 +06:00
parent 67c4277cb6
commit dcc76c9dd7
4 changed files with 9 additions and 2 deletions

View File

@ -35,6 +35,7 @@ import net.silentclient.client.utils.types.*;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.json.JSONObject; import org.json.JSONObject;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.GLContext; import org.lwjgl.opengl.GLContext;
import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.HttpsURLConnection;
@ -214,6 +215,7 @@ public class Client {
} }
globalSettings.save(); globalSettings.save();
Client.getInstance().updateWindowTitle();
logger.info("STARTING > config-manager"); logger.info("STARTING > config-manager");
configManager = new ConfigManager(); configManager = new ConfigManager();
logger.info("STARTING > texture-manager"); logger.info("STARTING > texture-manager");
@ -325,6 +327,10 @@ public class Client {
// utils // utils
public void updateWindowTitle() {
Display.setTitle(String.format("Silent Client%s %s (1.8.9)", Client.getInstance().getGlobalSettings() != null && Client.getInstance().getGlobalSettings().isLite() ? " Lite" : "", Client.getInstance().getFullVersion()));
}
public void updateUserInformation() { public void updateUserInformation() {
silentSocket.getSocket().emit("refresh", Minecraft.getMinecraft().getSession().getUsername().toLowerCase()); silentSocket.getSocket().emit("refresh", Minecraft.getMinecraft().getSession().getUsername().toLowerCase());
} }

View File

@ -74,7 +74,7 @@ public abstract class MinecraftMixin {
@Redirect(method = "createDisplay", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/Display;setTitle(Ljava/lang/String;)V")) @Redirect(method = "createDisplay", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/Display;setTitle(Ljava/lang/String;)V"))
public void setWindowTitle(String newTitle) { public void setWindowTitle(String newTitle) {
Display.setTitle("Silent Client " + Client.getInstance().getFullVersion() + " (1.8.9)"); Client.getInstance().updateWindowTitle();
} }
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;info(Ljava/lang/String;)V", ordinal = 1)) @Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;info(Ljava/lang/String;)V", ordinal = 1))

View File

@ -22,7 +22,7 @@ public class MenuBlurUtils {
} }
public static void renderBackground(GuiScreen instance) { public static void renderBackground(GuiScreen instance) {
if(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Menu Background Blur").getValBoolean()) { if(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Menu Background Blur").getValBoolean() && !Client.getInstance().getGlobalSettings().isLite()) {
((GuiAccessor) instance).silent$drawGradientRect(0, 0, instance.width, instance.height, new Color(0, 0, 0, 0).getRGB(), new Color(0, 0, 0, 0).getRGB()); ((GuiAccessor) instance).silent$drawGradientRect(0, 0, instance.width, instance.height, new Color(0, 0, 0, 0).getRGB(), new Color(0, 0, 0, 0).getRGB());
} else { } else {
instance.drawDefaultBackground(); instance.drawDefaultBackground();

View File

@ -27,6 +27,7 @@ public class GlobalSettings {
public void setLite(boolean lite) { public void setLite(boolean lite) {
this.lite = lite; this.lite = lite;
Client.getInstance().updateWindowTitle();
} }
public void save() { public void save() {