mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:41:31 +01:00
Lite Edition
This commit is contained in:
parent
2eb811c8f7
commit
908cebed24
@ -3,6 +3,7 @@ package net.silentclient.client;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.client.resources.data.IMetadataSerializer;
|
import net.minecraft.client.resources.data.IMetadataSerializer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
@ -15,9 +16,11 @@ import net.silentclient.client.event.impl.ConnectToServerEvent;
|
|||||||
import net.silentclient.client.event.impl.ServerLeaveEvent;
|
import net.silentclient.client.event.impl.ServerLeaveEvent;
|
||||||
import net.silentclient.client.event.impl.SingleplayerJoinEvent;
|
import net.silentclient.client.event.impl.SingleplayerJoinEvent;
|
||||||
import net.silentclient.client.gui.GuiError;
|
import net.silentclient.client.gui.GuiError;
|
||||||
import net.silentclient.client.gui.GuiNews;
|
import net.silentclient.client.gui.lite.GuiNews;
|
||||||
import net.silentclient.client.gui.clickgui.ClickGUI;
|
import net.silentclient.client.gui.lite.clickgui.ClickGUI;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
|
import net.silentclient.client.gui.lite.LiteMainMenu;
|
||||||
|
import net.silentclient.client.gui.silentmainmenu.SilentMainMenu;
|
||||||
import net.silentclient.client.gui.util.BackgroundPanorama;
|
import net.silentclient.client.gui.util.BackgroundPanorama;
|
||||||
import net.silentclient.client.keybinds.KeyBindManager;
|
import net.silentclient.client.keybinds.KeyBindManager;
|
||||||
import net.silentclient.client.mods.ModInstances;
|
import net.silentclient.client.mods.ModInstances;
|
||||||
@ -82,6 +85,8 @@ public class Client {
|
|||||||
private KeyBindManager keyBindManager;
|
private KeyBindManager keyBindManager;
|
||||||
private IMetadataSerializer iMetadataSerializer;
|
private IMetadataSerializer iMetadataSerializer;
|
||||||
private MouseCursorHandler mouseCursorHandler;
|
private MouseCursorHandler mouseCursorHandler;
|
||||||
|
private GlobalSettings globalSettings;
|
||||||
|
private File globalSettingsFile;
|
||||||
|
|
||||||
public static void memoryDebug(String paramString) {
|
public static void memoryDebug(String paramString) {
|
||||||
LogManager.getLogger().info("-- Start Memory Debug -- " + paramString);
|
LogManager.getLogger().info("-- Start Memory Debug -- " + paramString);
|
||||||
@ -94,7 +99,7 @@ public class Client {
|
|||||||
LogManager.getLogger().info("-- End Memory Debug -- " + paramString);
|
LogManager.getLogger().info("-- End Memory Debug -- " + paramString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() throws IOException {
|
||||||
try {
|
try {
|
||||||
InputStream in = getClass().getResourceAsStream("/build_data.json");
|
InputStream in = getClass().getResourceAsStream("/build_data.json");
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
||||||
@ -156,6 +161,10 @@ public class Client {
|
|||||||
if (!dir.exists()) {
|
if (!dir.exists()) {
|
||||||
dir.mkdirs();
|
dir.mkdirs();
|
||||||
}
|
}
|
||||||
|
globalSettingsFile = new File(Minecraft.getMinecraft().mcDataDir, "silent_settings.json");
|
||||||
|
if(!globalSettingsFile.exists()) {
|
||||||
|
globalSettingsFile.createNewFile();
|
||||||
|
}
|
||||||
logger.info("INITIALISING > event-manager");
|
logger.info("INITIALISING > event-manager");
|
||||||
EventManager.register(this);
|
EventManager.register(this);
|
||||||
logger.info("INITIALISING > silent-socket");
|
logger.info("INITIALISING > silent-socket");
|
||||||
@ -187,6 +196,25 @@ public class Client {
|
|||||||
settingsManager = new SettingsManager();
|
settingsManager = new SettingsManager();
|
||||||
logger.info("STARTING > mod-instances");
|
logger.info("STARTING > mod-instances");
|
||||||
modInstances = new ModInstances();
|
modInstances = new ModInstances();
|
||||||
|
logger.info("STARTING > global-settings");
|
||||||
|
globalSettings = new GlobalSettings();
|
||||||
|
try {
|
||||||
|
InputStream in = new FileInputStream(getGlobalSettingsFile());
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
||||||
|
StringBuffer content = new StringBuffer();
|
||||||
|
String inputLine;
|
||||||
|
while ((inputLine = reader.readLine()) != null) {
|
||||||
|
content.append(inputLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
globalSettings.setConfig(new JSONObject(content.toString()).getString("config"));
|
||||||
|
globalSettings.setLite(new JSONObject(content.toString()).getBoolean("lite"));
|
||||||
|
in.close();
|
||||||
|
} catch (Exception err) {
|
||||||
|
Client.logger.catching(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
globalSettings.save();
|
||||||
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");
|
||||||
@ -274,7 +302,14 @@ public class Client {
|
|||||||
|
|
||||||
logger.info("STARTING > mouse-cursor-handler");
|
logger.info("STARTING > mouse-cursor-handler");
|
||||||
this.mouseCursorHandler = new MouseCursorHandler();
|
this.mouseCursorHandler = new MouseCursorHandler();
|
||||||
|
|
||||||
|
if(globalSettings.lite) {
|
||||||
|
Minecraft.getMinecraft().displayGuiScreen(new GuiNews());
|
||||||
|
} else {
|
||||||
|
Minecraft.getMinecraft().displayGuiScreen(new SilentMainMenu());
|
||||||
|
}
|
||||||
} catch(Exception err) {
|
} catch(Exception err) {
|
||||||
|
Client.logger.catching(err);
|
||||||
logger.info("STARTING > ERROR: " + err.getMessage());
|
logger.info("STARTING > ERROR: " + err.getMessage());
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
@ -573,4 +608,19 @@ public class Client {
|
|||||||
public MouseCursorHandler getMouseCursorHandler() {
|
public MouseCursorHandler getMouseCursorHandler() {
|
||||||
return mouseCursorHandler;
|
return mouseCursorHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GlobalSettings getGlobalSettings() {
|
||||||
|
return globalSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public File getGlobalSettingsFile() {
|
||||||
|
return globalSettingsFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GuiScreen getMainMenu() {
|
||||||
|
if(Client.getInstance().getGlobalSettings() == null) {
|
||||||
|
return new SilentMainMenu();
|
||||||
|
}
|
||||||
|
return Client.getInstance().getGlobalSettings().isLite() ? new LiteMainMenu() : new SilentMainMenu();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,9 +21,9 @@ import net.silentclient.client.Client;
|
|||||||
import net.silentclient.client.cosmetics.AnimatedResourceLocation;
|
import net.silentclient.client.cosmetics.AnimatedResourceLocation;
|
||||||
import net.silentclient.client.cosmetics.ShieldData;
|
import net.silentclient.client.cosmetics.ShieldData;
|
||||||
import net.silentclient.client.cosmetics.gui.CosmeticsGui;
|
import net.silentclient.client.cosmetics.gui.CosmeticsGui;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.elements.StaticButton;
|
import net.silentclient.client.gui.elements.StaticButton;
|
||||||
import net.silentclient.client.mods.CustomFontRenderer;
|
import net.silentclient.client.mods.CustomFontRenderer;
|
||||||
import net.silentclient.client.mods.CustomFontRenderer.RenderMode;
|
import net.silentclient.client.mods.CustomFontRenderer.RenderMode;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package net.silentclient.client.config;
|
package net.silentclient.client.config;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
@ -9,13 +8,12 @@ import net.silentclient.client.Client;
|
|||||||
import net.silentclient.client.gui.SilentScreen;
|
import net.silentclient.client.gui.SilentScreen;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.IconButton;
|
import net.silentclient.client.gui.elements.IconButton;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.elements.Checkbox;
|
import net.silentclient.client.gui.elements.Checkbox;
|
||||||
import net.silentclient.client.gui.elements.Input;
|
import net.silentclient.client.gui.elements.Input;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.notification.NotificationManager;
|
import net.silentclient.client.gui.notification.NotificationManager;
|
||||||
import net.silentclient.client.gui.theme.Theme;
|
import net.silentclient.client.gui.theme.Theme;
|
||||||
import net.silentclient.client.mods.settings.GeneralMod;
|
|
||||||
import net.silentclient.client.utils.MenuBlurUtils;
|
import net.silentclient.client.utils.MenuBlurUtils;
|
||||||
import net.silentclient.client.utils.NotificationUtils;
|
import net.silentclient.client.utils.NotificationUtils;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
@ -25,44 +25,12 @@ import net.silentclient.client.utils.MenuBlurUtils;
|
|||||||
public final class ConfigManager {
|
public final class ConfigManager {
|
||||||
|
|
||||||
public File configFile;
|
public File configFile;
|
||||||
private final File settingsFile;
|
|
||||||
private Set<String> configs;
|
private Set<String> configs;
|
||||||
|
|
||||||
public ConfigManager() {
|
public ConfigManager() {
|
||||||
updateConfigs();
|
updateConfigs();
|
||||||
settingsFile = new File(Minecraft.getMinecraft().mcDataDir, "silent_settings.txt");
|
|
||||||
if(!settingsFile.exists()) {
|
|
||||||
try {
|
|
||||||
settingsFile.createNewFile();
|
|
||||||
try(PrintWriter writer = new PrintWriter(this.settingsFile)) {
|
|
||||||
writer.println("config:config.txt");
|
|
||||||
} catch (Exception err) {
|
|
||||||
err.printStackTrace();
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String config = "config.txt";
|
String config = Client.getInstance().getGlobalSettings().getConfig();
|
||||||
|
|
||||||
try (BufferedReader reader = new BufferedReader(new FileReader(this.settingsFile))) {
|
|
||||||
String s;
|
|
||||||
while ((s = reader.readLine()) != null) {
|
|
||||||
String[] args = s.split(":");
|
|
||||||
if(s.toLowerCase().startsWith("config:")) {
|
|
||||||
try {
|
|
||||||
if(!args[1].equals(settingsFile.getName())) {
|
|
||||||
config = args[1];
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception err) {
|
|
||||||
err.printStackTrace();
|
|
||||||
}
|
|
||||||
configFile = new File(Client.getInstance().dir, config);
|
configFile = new File(Client.getInstance().dir, config);
|
||||||
|
|
||||||
|
|
||||||
@ -100,11 +68,7 @@ public final class ConfigManager {
|
|||||||
|
|
||||||
public void loadConfig(String name) {
|
public void loadConfig(String name) {
|
||||||
Client.logger.info("Loading Config: " + name);
|
Client.logger.info("Loading Config: " + name);
|
||||||
try(PrintWriter writer = new PrintWriter(this.settingsFile)) {
|
Client.getInstance().getGlobalSettings().setConfig(name);
|
||||||
writer.println("config:" + name);
|
|
||||||
} catch (Exception err) {
|
|
||||||
err.printStackTrace();
|
|
||||||
}
|
|
||||||
configFile = new File(Client.getInstance().dir, name);
|
configFile = new File(Client.getInstance().dir, name);
|
||||||
if(!configFile.exists()) {
|
if(!configFile.exists()) {
|
||||||
try {
|
try {
|
||||||
@ -122,6 +86,7 @@ public final class ConfigManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
NotificationManager.clear();
|
NotificationManager.clear();
|
||||||
|
Client.getInstance().getGlobalSettings().save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String newConfig(String name, boolean clone) {
|
public String newConfig(String name, boolean clone) {
|
||||||
@ -138,12 +103,8 @@ public final class ConfigManager {
|
|||||||
return "Error: " + e.getMessage();
|
return "Error: " + e.getMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try(PrintWriter writer = new PrintWriter(this.settingsFile)) {
|
Client.getInstance().getGlobalSettings().setConfig(name);
|
||||||
writer.println("config:" + name);
|
Client.getInstance().getGlobalSettings().save();
|
||||||
} catch (Exception err) {
|
|
||||||
Client.logger.catching(err);
|
|
||||||
return "Error: " + err.getMessage();
|
|
||||||
}
|
|
||||||
configFile = testConfig;
|
configFile = testConfig;
|
||||||
if(!clone) {
|
if(!clone) {
|
||||||
Client.getInstance().getModInstances().getMods().forEach(mod -> mod.reset(true));
|
Client.getInstance().getModInstances().getMods().forEach(mod -> mod.reset(true));
|
||||||
|
@ -12,8 +12,8 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.SilentScreen;
|
import net.silentclient.client.gui.SilentScreen;
|
||||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils.Scroll;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils.Scroll;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.Input;
|
import net.silentclient.client.gui.elements.Input;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
|
@ -5,17 +5,15 @@ import java.io.IOException;
|
|||||||
import net.silentclient.client.utils.MenuBlurUtils;
|
import net.silentclient.client.utils.MenuBlurUtils;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.elements.IconButton;
|
import net.silentclient.client.gui.elements.IconButton;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.notification.NotificationManager;
|
import net.silentclient.client.gui.notification.NotificationManager;
|
||||||
import net.silentclient.client.gui.theme.Theme;
|
import net.silentclient.client.gui.theme.Theme;
|
||||||
import net.silentclient.client.mods.settings.GeneralMod;
|
|
||||||
|
|
||||||
public class ModalBase extends GuiScreen {
|
public class ModalBase extends GuiScreen {
|
||||||
private final GuiScreen parentScreen;
|
private final GuiScreen parentScreen;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package net.silentclient.client.gui.elements;
|
package net.silentclient.client.gui.elements;
|
||||||
|
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.theme.checkbox.DefaultCheckboxTheme;
|
import net.silentclient.client.gui.theme.checkbox.DefaultCheckboxTheme;
|
||||||
import net.silentclient.client.gui.theme.checkbox.ICheckboxTheme;
|
import net.silentclient.client.gui.theme.checkbox.ICheckboxTheme;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package net.silentclient.client.gui.elements;
|
package net.silentclient.client.gui.elements;
|
||||||
|
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import net.minecraft.client.gui.GuiScreen;
|
|||||||
import net.minecraft.util.ChatAllowedCharacters;
|
import net.minecraft.util.ChatAllowedCharacters;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.theme.input.DefaultInputTheme;
|
import net.silentclient.client.gui.theme.input.DefaultInputTheme;
|
||||||
import net.silentclient.client.gui.theme.input.IInputTheme;
|
import net.silentclient.client.gui.theme.input.IInputTheme;
|
||||||
@ -14,7 +14,6 @@ import net.silentclient.client.utils.NotificationUtils;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class Input {
|
public class Input {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package net.silentclient.client.gui.elements;
|
package net.silentclient.client.gui.elements;
|
||||||
|
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.utils.ColorUtils;
|
import net.silentclient.client.utils.ColorUtils;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package net.silentclient.client.gui.elements;
|
package net.silentclient.client.gui.elements;
|
||||||
|
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package net.silentclient.client.gui.elements;
|
|||||||
|
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
import net.silentclient.client.gui.theme.button.DefaultButtonTheme;
|
import net.silentclient.client.gui.theme.button.DefaultButtonTheme;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package net.silentclient.client.gui.elements;
|
package net.silentclient.client.gui.elements;
|
||||||
|
|
||||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.theme.switches.DefaultSwitchTheme;
|
import net.silentclient.client.gui.theme.switches.DefaultSwitchTheme;
|
||||||
import net.silentclient.client.gui.theme.switches.ISwitchSchema;
|
import net.silentclient.client.gui.theme.switches.ISwitchSchema;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
|
@ -6,7 +6,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.SilentScreen;
|
import net.silentclient.client.gui.SilentScreen;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.IconButton;
|
import net.silentclient.client.gui.elements.IconButton;
|
||||||
import net.silentclient.client.gui.elements.Input;
|
import net.silentclient.client.gui.elements.Input;
|
||||||
|
@ -7,8 +7,8 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.IconButton;
|
import net.silentclient.client.gui.elements.IconButton;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
|
@ -16,11 +16,10 @@ import net.minecraft.client.gui.GuiScreen;
|
|||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.ModSettings;
|
import net.silentclient.client.gui.lite.clickgui.ModSettings;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer.FontType;
|
import net.silentclient.client.gui.font.SilentFontRenderer.FontType;
|
||||||
import net.silentclient.client.mods.CustomFontRenderer;
|
import net.silentclient.client.mods.CustomFontRenderer;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package net.silentclient.client.gui;
|
package net.silentclient.client.gui.lite;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
@ -9,9 +9,8 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.minecraft.GuiMainMenu;
|
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
import net.silentclient.client.utils.SCTextureManager;
|
import net.silentclient.client.utils.SCTextureManager;
|
||||||
import net.silentclient.client.utils.TimerUtils;
|
import net.silentclient.client.utils.TimerUtils;
|
||||||
@ -89,7 +88,7 @@ public class GuiNews extends GuiScreen {
|
|||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton button) throws IOException {
|
protected void actionPerformed(GuiButton button) throws IOException {
|
||||||
if(button.id == 1) {
|
if(button.id == 1) {
|
||||||
mc.displayGuiScreen(new GuiMainMenu());
|
mc.displayGuiScreen(new LiteMainMenu());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.silentclient.client.gui.minecraft;
|
package net.silentclient.client.gui.lite;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
@ -24,14 +24,13 @@ import net.minecraft.world.storage.ISaveFormat;
|
|||||||
import net.minecraft.world.storage.WorldInfo;
|
import net.minecraft.world.storage.WorldInfo;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.cosmetics.gui.CosmeticsGui;
|
import net.silentclient.client.cosmetics.gui.CosmeticsGui;
|
||||||
import net.silentclient.client.gui.GuiNews;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.IconButton;
|
import net.silentclient.client.gui.elements.IconButton;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
|
|
||||||
public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
|
public class LiteMainMenu extends GuiScreen implements GuiYesNoCallback
|
||||||
{
|
{
|
||||||
private static final Logger logger = LogManager.getLogger();
|
private static final Logger logger = LogManager.getLogger();
|
||||||
private static final Random RANDOM = new Random();
|
private static final Random RANDOM = new Random();
|
||||||
@ -80,7 +79,7 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
|
|||||||
|
|
||||||
/** Minecraft Realms button. */
|
/** Minecraft Realms button. */
|
||||||
private GuiButton realmsButton;
|
private GuiButton realmsButton;
|
||||||
public GuiMainMenu() {
|
public LiteMainMenu() {
|
||||||
this.openGLWarning2 = field_96138_a;
|
this.openGLWarning2 = field_96138_a;
|
||||||
this.splashText = "";
|
this.splashText = "";
|
||||||
this.setUpdateCounter(RANDOM.nextFloat());
|
this.setUpdateCounter(RANDOM.nextFloat());
|
||||||
@ -94,7 +93,7 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GuiMainMenu(boolean firstTime)
|
public LiteMainMenu(boolean firstTime)
|
||||||
{
|
{
|
||||||
this.openGLWarning2 = field_96138_a;
|
this.openGLWarning2 = field_96138_a;
|
||||||
this.splashText = "";
|
this.splashText = "";
|
||||||
@ -222,6 +221,8 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(button.id == 89) {
|
if(button.id == 89) {
|
||||||
|
Client.getInstance().getGlobalSettings().setLite(false);
|
||||||
|
Client.getInstance().getGlobalSettings().save();
|
||||||
mc.displayGuiScreen(new SilentMainMenu());
|
mc.displayGuiScreen(new SilentMainMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,7 +329,7 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback
|
|||||||
f = f * 100.0F / (float)(this.fontRendererObj.getStringWidth(this.splashText) + 32);
|
f = f * 100.0F / (float)(this.fontRendererObj.getStringWidth(this.splashText) + 32);
|
||||||
GlStateManager.scale(f, f, f);
|
GlStateManager.scale(f, f, f);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
String s = "Silent Client 1.8.9";
|
String s = "SC Lite 1.8.9";
|
||||||
|
|
||||||
if (this.mc.isDemo())
|
if (this.mc.isDemo())
|
||||||
{
|
{
|
@ -1,4 +1,4 @@
|
|||||||
package net.silentclient.client.gui.clickgui;
|
package net.silentclient.client.gui.lite.clickgui;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
@ -12,8 +12,8 @@ import net.silentclient.client.gui.animation.SimpleAnimation;
|
|||||||
import net.silentclient.client.gui.animation.normal.Animation;
|
import net.silentclient.client.gui.animation.normal.Animation;
|
||||||
import net.silentclient.client.gui.animation.normal.Direction;
|
import net.silentclient.client.gui.animation.normal.Direction;
|
||||||
import net.silentclient.client.gui.animation.normal.impl.EaseBackIn;
|
import net.silentclient.client.gui.animation.normal.impl.EaseBackIn;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.Input;
|
import net.silentclient.client.gui.elements.Input;
|
||||||
import net.silentclient.client.gui.elements.Switch;
|
import net.silentclient.client.gui.elements.Switch;
|
@ -1,4 +1,4 @@
|
|||||||
package net.silentclient.client.gui.clickgui;
|
package net.silentclient.client.gui.lite.clickgui;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
@ -7,9 +7,9 @@ import net.minecraft.util.MathHelper;
|
|||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.animation.normal.Direction;
|
import net.silentclient.client.gui.animation.normal.Direction;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.Checkbox;
|
import net.silentclient.client.gui.elements.Checkbox;
|
||||||
import net.silentclient.client.gui.elements.Slider;
|
import net.silentclient.client.gui.elements.Slider;
|
@ -1,4 +1,4 @@
|
|||||||
package net.silentclient.client.gui.clickgui;
|
package net.silentclient.client.gui.lite.clickgui;
|
||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
@ -10,9 +10,9 @@ import net.silentclient.client.Client;
|
|||||||
import net.silentclient.client.gui.SilentScreen;
|
import net.silentclient.client.gui.SilentScreen;
|
||||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||||
import net.silentclient.client.gui.animation.normal.Direction;
|
import net.silentclient.client.gui.animation.normal.Direction;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils.Scroll;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils.Scroll;
|
||||||
import net.silentclient.client.gui.elements.*;
|
import net.silentclient.client.gui.elements.*;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.hud.HUDConfigScreen;
|
import net.silentclient.client.gui.hud.HUDConfigScreen;
|
@ -1,4 +1,4 @@
|
|||||||
package net.silentclient.client.gui.clickgui.utils;
|
package net.silentclient.client.gui.lite.clickgui.utils;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.silentclient.client.gui.clickgui.utils;
|
package net.silentclient.client.gui.lite.clickgui.utils;
|
||||||
|
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.silentclient.client.gui.clickgui.utils;
|
package net.silentclient.client.gui.lite.clickgui.utils;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
@ -18,7 +18,7 @@ import net.silentclient.client.event.impl.ServerLeaveEvent;
|
|||||||
import net.silentclient.client.gui.elements.IconButton;
|
import net.silentclient.client.gui.elements.IconButton;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.GuiMultiplayerInGame;
|
import net.silentclient.client.gui.GuiMultiplayerInGame;
|
||||||
import net.silentclient.client.gui.clickgui.ClickGUI;
|
import net.silentclient.client.gui.lite.clickgui.ClickGUI;
|
||||||
import net.silentclient.client.gui.friends.FriendsListOverlay;
|
import net.silentclient.client.gui.friends.FriendsListOverlay;
|
||||||
import net.silentclient.client.gui.hud.Watermark;
|
import net.silentclient.client.gui.hud.Watermark;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
@ -87,16 +87,16 @@ public class GuiIngameMenu extends GuiScreen
|
|||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
this.mc.displayGuiScreen(new GuiMainMenu());
|
this.mc.displayGuiScreen(Client.getInstance().getMainMenu());
|
||||||
}
|
}
|
||||||
else if (flag1)
|
else if (flag1)
|
||||||
{
|
{
|
||||||
RealmsBridge realmsbridge = new RealmsBridge();
|
RealmsBridge realmsbridge = new RealmsBridge();
|
||||||
realmsbridge.switchToRealms(new GuiMainMenu());
|
realmsbridge.switchToRealms(Client.getInstance().getMainMenu());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu()));
|
this.mc.displayGuiScreen(new GuiMultiplayer(Client.getInstance().getMainMenu()));
|
||||||
}
|
}
|
||||||
new ServerLeaveEvent().call();
|
new ServerLeaveEvent().call();
|
||||||
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
package net.silentclient.client.gui.modmenu;
|
||||||
|
|
||||||
|
import net.silentclient.client.gui.SilentScreen;
|
||||||
|
|
||||||
|
public class ModMenu extends SilentScreen {
|
||||||
|
}
|
@ -6,14 +6,13 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.admin.AdminRender;
|
|
||||||
import net.silentclient.client.cosmetics.gui.CosmeticsGui;
|
import net.silentclient.client.cosmetics.gui.CosmeticsGui;
|
||||||
import net.silentclient.client.gui.GuiNews;
|
import net.silentclient.client.gui.lite.GuiNews;
|
||||||
import net.silentclient.client.gui.SilentScreen;
|
import net.silentclient.client.gui.SilentScreen;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.minecraft.GuiMainMenu;
|
import net.silentclient.client.gui.lite.LiteMainMenu;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
import net.silentclient.client.utils.SCTextureManager;
|
import net.silentclient.client.utils.SCTextureManager;
|
||||||
|
|
||||||
@ -29,19 +28,15 @@ public class SilentMainMenu extends SilentScreen {
|
|||||||
public static boolean loading = false;
|
public static boolean loading = false;
|
||||||
public static boolean initPanel = false;
|
public static boolean initPanel = false;
|
||||||
|
|
||||||
private MenuButton singleplayerButton;
|
|
||||||
private MenuButton multiplayerButton;
|
|
||||||
private MenuButton quitGameButton;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
super.initGui();
|
super.initGui();
|
||||||
this.buttonList.clear();
|
this.buttonList.clear();
|
||||||
Client.backgroundPanorama.updateWidthHeight(this.width, this.height);
|
Client.backgroundPanorama.updateWidthHeight(this.width, this.height);
|
||||||
|
|
||||||
this.buttonList.add(this.singleplayerButton = new MenuButton(1, this.width / 2 - 130, 40, "Singleplayer"));
|
this.buttonList.add(new MenuButton(1, this.width / 2 - 130, 40, "Singleplayer"));
|
||||||
this.buttonList.add(this.multiplayerButton = new MenuButton(2, this.width / 2 - 40, 40, "Multiplayer"));
|
this.buttonList.add(new MenuButton(2, this.width / 2 - 40, 40, "Multiplayer"));
|
||||||
this.buttonList.add(this.quitGameButton = new MenuButton(3, this.width / 2 + 50, 40, "Quit Game"));
|
this.buttonList.add(new MenuButton(3, this.width / 2 + 50, 40, "Quit Game"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -79,7 +74,7 @@ public class SilentMainMenu extends SilentScreen {
|
|||||||
optionY += 15;
|
optionY += 15;
|
||||||
this.drawOptionButton(mouseX, mouseY, blockX + 5, optionY, new ResourceLocation("silentclient/icons/language.png"), "Language");
|
this.drawOptionButton(mouseX, mouseY, blockX + 5, optionY, new ResourceLocation("silentclient/icons/language.png"), "Language");
|
||||||
optionY += 15;
|
optionY += 15;
|
||||||
this.drawOptionButton(mouseX, mouseY, blockX + 5, optionY, new ResourceLocation("silentclient/icons/back.png"), "Vanilla Menu");
|
this.drawOptionButton(mouseX, mouseY, blockX + 5, optionY, new ResourceLocation("silentclient/icons/back.png"), "Lite Edition");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawOptionButton(int mouseX, int mouseY, int x, int y, ResourceLocation icon, String text) {
|
private void drawOptionButton(int mouseX, int mouseY, int x, int y, ResourceLocation icon, String text) {
|
||||||
@ -181,7 +176,9 @@ public class SilentMainMenu extends SilentScreen {
|
|||||||
}
|
}
|
||||||
optionY += 15;
|
optionY += 15;
|
||||||
if(this.optionHovered(mouseX, mouseY, blockX, optionY)) {
|
if(this.optionHovered(mouseX, mouseY, blockX, optionY)) {
|
||||||
mc.displayGuiScreen(new GuiMainMenu());
|
Client.getInstance().getGlobalSettings().setLite(true);
|
||||||
|
Client.getInstance().getGlobalSettings().save();
|
||||||
|
mc.displayGuiScreen(new LiteMainMenu());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package net.silentclient.client.gui.theme;
|
package net.silentclient.client.gui.theme;
|
||||||
|
|
||||||
|
import net.silentclient.client.Client;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
public class Theme {
|
public class Theme {
|
||||||
public static Color backgroundColor() {
|
public static Color backgroundColor() {
|
||||||
return new Color(0, 0, 0, 127);
|
if(Client.getInstance().getGlobalSettings() != null && Client.getInstance().getGlobalSettings().isLite()) {
|
||||||
|
return new Color(0, 0, 0, 127);
|
||||||
|
}
|
||||||
|
return new Color(20, 20, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Color borderColor() {
|
public static Color borderColor() {
|
||||||
|
@ -4,7 +4,7 @@ import net.minecraft.client.gui.GuiChat;
|
|||||||
import net.minecraft.client.gui.GuiTextField;
|
import net.minecraft.client.gui.GuiTextField;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.mods.render.ChatMod;
|
import net.silentclient.client.mods.render.ChatMod;
|
||||||
import net.silentclient.client.utils.calculator.ChatCalculator;
|
import net.silentclient.client.utils.calculator.ChatCalculator;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
@ -11,7 +11,7 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.event.impl.EventRenderDamageTint;
|
import net.silentclient.client.event.impl.EventRenderDamageTint;
|
||||||
import net.silentclient.client.event.impl.RenderEvent;
|
import net.silentclient.client.event.impl.RenderEvent;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.notification.NotificationManager;
|
import net.silentclient.client.gui.notification.NotificationManager;
|
||||||
import net.silentclient.client.mods.hud.BossBarMod;
|
import net.silentclient.client.mods.hud.BossBarMod;
|
||||||
import net.silentclient.client.mods.hud.ScoreboardMod;
|
import net.silentclient.client.mods.hud.ScoreboardMod;
|
||||||
|
@ -18,6 +18,8 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import net.minecraft.world.WorldSettings;
|
import net.minecraft.world.WorldSettings;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.event.impl.*;
|
import net.silentclient.client.event.impl.*;
|
||||||
|
import net.silentclient.client.gui.lite.GuiNews;
|
||||||
|
import net.silentclient.client.gui.lite.LiteMainMenu;
|
||||||
import net.silentclient.client.gui.silentmainmenu.SilentMainMenu;
|
import net.silentclient.client.gui.silentmainmenu.SilentMainMenu;
|
||||||
import net.silentclient.client.gui.util.BackgroundPanorama;
|
import net.silentclient.client.gui.util.BackgroundPanorama;
|
||||||
import net.silentclient.client.hooks.MinecraftHook;
|
import net.silentclient.client.hooks.MinecraftHook;
|
||||||
@ -40,11 +42,12 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
@Mixin(Minecraft.class)
|
@Mixin(Minecraft.class)
|
||||||
public abstract class MinecraftMixin {
|
public abstract class MinecraftMixin {
|
||||||
@Inject(method = "startGame", at = @At("HEAD"))
|
@Inject(method = "startGame", at = @At("HEAD"))
|
||||||
public void initClient(CallbackInfo callbackInfo) {
|
public void initClient(CallbackInfo callbackInfo) throws IOException {
|
||||||
Client.getInstance().init();
|
Client.getInstance().init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +62,9 @@ public abstract class MinecraftMixin {
|
|||||||
if(Client.backgroundPanorama == null) {
|
if(Client.backgroundPanorama == null) {
|
||||||
Client.backgroundPanorama = new BackgroundPanorama(Minecraft.getMinecraft());
|
Client.backgroundPanorama = new BackgroundPanorama(Minecraft.getMinecraft());
|
||||||
}
|
}
|
||||||
displayGuiScreen(new SilentMainMenu());
|
if(Client.getInstance().getGlobalSettings() != null) {
|
||||||
|
displayGuiScreen(Client.getInstance().getGlobalSettings().isLite() ? new GuiNews() : new SilentMainMenu());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "shutdownMinecraftApplet", at = @At("HEAD"))
|
@Inject(method = "shutdownMinecraftApplet", at = @At("HEAD"))
|
||||||
@ -122,7 +127,9 @@ public abstract class MinecraftMixin {
|
|||||||
Client.backgroundPanorama = new BackgroundPanorama(Minecraft.getMinecraft());
|
Client.backgroundPanorama = new BackgroundPanorama(Minecraft.getMinecraft());
|
||||||
}
|
}
|
||||||
if(guiScreenIn instanceof GuiMainMenu) {
|
if(guiScreenIn instanceof GuiMainMenu) {
|
||||||
displayGuiScreen(new SilentMainMenu());
|
if(Client.getInstance().getGlobalSettings() != null) {
|
||||||
|
displayGuiScreen(Client.getInstance().getGlobalSettings().isLite() ? new LiteMainMenu() : new SilentMainMenu());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(guiScreenIn instanceof GuiIngameMenu) {
|
if(guiScreenIn instanceof GuiIngameMenu) {
|
||||||
|
@ -3,7 +3,7 @@ package net.silentclient.client.mods;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.hud.ScreenPosition;
|
import net.silentclient.client.gui.hud.ScreenPosition;
|
||||||
|
|
||||||
public class HudMod extends ModDraggable {
|
public class HudMod extends ModDraggable {
|
||||||
|
@ -14,8 +14,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.event.EventTarget;
|
import net.silentclient.client.event.EventTarget;
|
||||||
import net.silentclient.client.event.impl.RenderEvent;
|
import net.silentclient.client.event.impl.RenderEvent;
|
||||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.hud.HUDConfigScreen;
|
import net.silentclient.client.gui.hud.HUDConfigScreen;
|
||||||
import net.silentclient.client.gui.hud.IRenderer;
|
import net.silentclient.client.gui.hud.IRenderer;
|
||||||
|
@ -8,7 +8,7 @@ import net.minecraft.client.renderer.RenderHelper;
|
|||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.hud.ScreenPosition;
|
import net.silentclient.client.gui.hud.ScreenPosition;
|
||||||
import net.silentclient.client.mods.CustomFontRenderer;
|
import net.silentclient.client.mods.CustomFontRenderer;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
|
@ -15,8 +15,8 @@ import net.minecraft.potion.Potion;
|
|||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.hud.ScreenPosition;
|
import net.silentclient.client.gui.hud.ScreenPosition;
|
||||||
import net.silentclient.client.mods.CustomFontRenderer;
|
import net.silentclient.client.mods.CustomFontRenderer;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
|
@ -5,7 +5,7 @@ import java.awt.Color;
|
|||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.world.chunk.Chunk;
|
import net.minecraft.world.chunk.Chunk;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.hud.ScreenPosition;
|
import net.silentclient.client.gui.hud.ScreenPosition;
|
||||||
import net.silentclient.client.mods.CustomFontRenderer;
|
import net.silentclient.client.mods.CustomFontRenderer;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
|
@ -11,8 +11,8 @@ import net.minecraft.client.settings.KeyBinding;
|
|||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.hud.ScreenPosition;
|
import net.silentclient.client.gui.hud.ScreenPosition;
|
||||||
import net.silentclient.client.mods.CustomFontRenderer;
|
import net.silentclient.client.mods.CustomFontRenderer;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
|
@ -9,7 +9,7 @@ import net.silentclient.client.Client;
|
|||||||
import net.silentclient.client.event.EventTarget;
|
import net.silentclient.client.event.EventTarget;
|
||||||
import net.silentclient.client.event.impl.ClientTickEvent;
|
import net.silentclient.client.event.impl.ClientTickEvent;
|
||||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.hud.ScreenPosition;
|
import net.silentclient.client.gui.hud.ScreenPosition;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
|
@ -9,7 +9,6 @@ import net.silentclient.client.gui.SilentScreen;
|
|||||||
import net.silentclient.client.utils.MenuBlurUtils;
|
import net.silentclient.client.utils.MenuBlurUtils;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
@ -17,8 +16,8 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.event.EventTarget;
|
import net.silentclient.client.event.EventTarget;
|
||||||
import net.silentclient.client.event.impl.KeyEvent;
|
import net.silentclient.client.event.impl.KeyEvent;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.IconButton;
|
import net.silentclient.client.gui.elements.IconButton;
|
||||||
import net.silentclient.client.gui.elements.Input;
|
import net.silentclient.client.gui.elements.Input;
|
||||||
@ -28,7 +27,6 @@ import net.silentclient.client.gui.theme.Theme;
|
|||||||
import net.silentclient.client.mods.CustomFontRenderer;
|
import net.silentclient.client.mods.CustomFontRenderer;
|
||||||
import net.silentclient.client.mods.Mod;
|
import net.silentclient.client.mods.Mod;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
import net.silentclient.client.mods.settings.GeneralMod;
|
|
||||||
import net.silentclient.client.utils.NotificationUtils;
|
import net.silentclient.client.utils.NotificationUtils;
|
||||||
|
|
||||||
public class AutoTextMod extends Mod {
|
public class AutoTextMod extends Mod {
|
||||||
|
@ -5,7 +5,7 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.hud.ScreenPosition;
|
import net.silentclient.client.gui.hud.ScreenPosition;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
import net.silentclient.client.mods.ModDraggable;
|
import net.silentclient.client.mods.ModDraggable;
|
||||||
|
@ -26,9 +26,9 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.event.EventTarget;
|
import net.silentclient.client.event.EventTarget;
|
||||||
import net.silentclient.client.event.impl.RenderEvent;
|
import net.silentclient.client.event.impl.RenderEvent;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
import net.silentclient.client.mods.CustomFontRenderer;
|
import net.silentclient.client.mods.CustomFontRenderer;
|
||||||
|
@ -2,15 +2,12 @@ package net.silentclient.client.mods.settings;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.clickgui.ClickGUI;
|
import net.silentclient.client.gui.lite.clickgui.ClickGUI;
|
||||||
import net.silentclient.client.mods.Mod;
|
import net.silentclient.client.mods.Mod;
|
||||||
import net.silentclient.client.mods.ModCategory;
|
import net.silentclient.client.mods.ModCategory;
|
||||||
import net.silentclient.client.mods.Setting;
|
import net.silentclient.client.mods.Setting;
|
||||||
import net.silentclient.client.utils.MenuBlurUtils;
|
import net.silentclient.client.utils.MenuBlurUtils;
|
||||||
import net.silentclient.client.utils.NotificationUtils;
|
|
||||||
import net.silentclient.client.utils.OSUtil;
|
import net.silentclient.client.utils.OSUtil;
|
||||||
import net.silentclient.client.utils.RawInputHandler;
|
import net.silentclient.client.utils.RawInputHandler;
|
||||||
|
|
||||||
|
@ -4,14 +4,13 @@ import java.io.IOException;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.GuiNews;
|
import net.silentclient.client.gui.lite.GuiNews;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer.FontType;
|
import net.silentclient.client.gui.font.SilentFontRenderer.FontType;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
|
@ -7,10 +7,10 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.gui.animation.normal.Direction;
|
import net.silentclient.client.gui.animation.normal.Direction;
|
||||||
import net.silentclient.client.gui.clickgui.ClickGUI;
|
import net.silentclient.client.gui.lite.clickgui.ClickGUI;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.MouseUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||||
import net.silentclient.client.gui.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.elements.Button;
|
import net.silentclient.client.gui.elements.Button;
|
||||||
import net.silentclient.client.gui.elements.Checkbox;
|
import net.silentclient.client.gui.elements.Checkbox;
|
||||||
import net.silentclient.client.gui.elements.*;
|
import net.silentclient.client.gui.elements.*;
|
||||||
|
@ -18,7 +18,7 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import net.silentclient.client.Client;
|
import net.silentclient.client.Client;
|
||||||
import net.silentclient.client.event.EventTarget;
|
import net.silentclient.client.event.EventTarget;
|
||||||
import net.silentclient.client.event.impl.ClientTickEvent;
|
import net.silentclient.client.event.impl.ClientTickEvent;
|
||||||
import net.silentclient.client.gui.clickgui.utils.GlUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||||
import net.silentclient.client.mods.render.CrosshairMod;
|
import net.silentclient.client.mods.render.CrosshairMod;
|
||||||
import net.silentclient.client.mods.settings.FPSBoostMod;
|
import net.silentclient.client.mods.settings.FPSBoostMod;
|
||||||
import net.silentclient.client.mods.settings.RenderMod;
|
import net.silentclient.client.mods.settings.RenderMod;
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
package net.silentclient.client.utils.types;
|
||||||
|
|
||||||
|
import net.silentclient.client.Client;
|
||||||
|
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
|
||||||
|
public class GlobalSettings {
|
||||||
|
public String config;
|
||||||
|
public boolean lite;
|
||||||
|
|
||||||
|
public GlobalSettings() {
|
||||||
|
this.config = "config.txt";
|
||||||
|
this.lite = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfig() {
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfig(String config) {
|
||||||
|
this.config = config;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLite() {
|
||||||
|
return lite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLite(boolean lite) {
|
||||||
|
this.lite = lite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void save() {
|
||||||
|
try {
|
||||||
|
FileOutputStream outputStream = new FileOutputStream(Client.getInstance().getGlobalSettingsFile());
|
||||||
|
byte[] strToBytes = Client.getInstance().getGson().toJson(this).toString().getBytes();
|
||||||
|
outputStream.write(strToBytes);
|
||||||
|
|
||||||
|
outputStream.close();
|
||||||
|
} catch (Exception err) {
|
||||||
|
Client.logger.catching(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user