[FIX] Альтернативное зеркало и фиксы профилей

This commit is contained in:
Gravit 2020-07-15 10:54:10 +07:00
parent b92e9a1d29
commit cd890a73ee
No known key found for this signature in database
GPG key ID: 98A079490768CCE5
18 changed files with 144 additions and 60 deletions

View file

@ -63,6 +63,14 @@ public void invoke(String... args) throws IOException, CommandException {
client.setTitle(dirName); client.setTitle(dirName);
client.setDir(dirName); client.setDir(dirName);
client.setUUID(UUID.randomUUID()); client.setUUID(UUID.randomUUID());
if(client.getServers() != null)
{
ClientProfile.ServerProfile serverProfile = client.getDefaultServerProfile();
if(serverProfile != null)
{
serverProfile.name = dirName;
}
}
try (BufferedWriter writer = IOHelper.newWriter(IOHelper.resolveIncremental(server.profilesDir, try (BufferedWriter writer = IOHelper.newWriter(IOHelper.resolveIncremental(server.profilesDir,
dirName, "json"))) { dirName, "json"))) {
Launcher.gsonManager.configGson.toJson(client, writer); Launcher.gsonManager.configGson.toJson(client, writer);

View file

@ -48,7 +48,7 @@ public final class LaunchServerConfig {
public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) {
LaunchServerConfig newConfig = new LaunchServerConfig(); LaunchServerConfig newConfig = new LaunchServerConfig();
newConfig.mirrors = new String[]{"https://mirror.gravit.pro/"}; newConfig.mirrors = new String[]{"https://mirror.gravit.pro/", "https://gravit-launcher-mirror.storage.googleapis.com/"};
newConfig.launch4j = new LaunchServerConfig.ExeConf(); newConfig.launch4j = new LaunchServerConfig.ExeConf();
newConfig.launch4j.enabled = true; newConfig.launch4j.enabled = true;
newConfig.launch4j.copyright = "© GravitLauncher Team"; newConfig.launch4j.copyright = "© GravitLauncher Team";

View file

@ -6,14 +6,16 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"update": ["servers.dat"], "isDefault": true
"updateExclusions": [ }
"mods/OpenSecurity",
"mods/VoxelMods",
"mods/railcraft"
], ],
"update": ["servers.dat"],
"updateExclusions": [],
"updateShared": [], "updateShared": [],
"updateVerify": [ "updateVerify": [
"libraries", "natives", "mods", "libraries", "natives", "mods",

View file

@ -6,14 +6,16 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"update": ["servers.dat"], "isDefault": true
"updateExclusions": [ }
"mods/OpenSecurity",
"mods/VoxelMods",
"mods/railcraft"
], ],
"update": ["servers.dat"],
"updateExclusions": [],
"updateShared": [], "updateShared": [],
"updateVerify": [ "updateVerify": [
"libraries", "natives", "mods", "libraries", "natives", "mods",

View file

@ -6,14 +6,16 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"update": ["servers.dat"], "isDefault": true
"updateExclusions": [ }
"mods/OpenSecurity",
"mods/VoxelMods",
"mods/railcraft"
], ],
"update": ["servers.dat"],
"updateExclusions": [],
"updateShared": [], "updateShared": [],
"updateVerify": [ "updateVerify": [
"libraries", "natives", "mods", "libraries", "natives", "mods",
@ -35,8 +37,8 @@
], ],
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"], "classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
"clientArgs": [ "clientArgs": [
"--tweakClass", "net.minecraftforge.fml.common.launcher.FMLTweaker", "--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker",
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker" "--tweakClass", "net.minecraftforge.fml.common.launcher.FMLTweaker"
], ],
"optionalJVMArgs": [], "optionalJVMArgs": [],
"optionalClientArgs": [], "optionalClientArgs": [],

View file

@ -6,14 +6,16 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"update": ["servers.dat"], "isDefault": true
"updateExclusions": [ }
"mods/OpenSecurity",
"mods/VoxelMods",
"mods/railcraft"
], ],
"update": ["servers.dat"],
"updateExclusions": [],
"updateShared": [], "updateShared": [],
"updateVerify": [ "updateVerify": [
"libraries", "natives", "mods", "libraries", "natives", "mods",

View file

@ -6,14 +6,16 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"update": ["servers.dat"], "isDefault": true
"updateExclusions": [ }
"mods/OpenSecurity",
"mods/VoxelMods",
"mods/railcraft"
], ],
"update": ["servers.dat"],
"updateExclusions": [],
"updateShared": [], "updateShared": [],
"updateVerify": [ "updateVerify": [
"libraries", "natives", "mods", "libraries", "natives", "mods",

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": [ "update": [
"servers.dat" "servers.dat"
], ],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": [ "update": [
"servers.dat" "servers.dat"
], ],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": [ "update": [
"servers.dat" "servers.dat"
], ],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "xxxxxxxx", "title": "xxxxxxxx",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": [ "update": [
"servers.dat" "servers.dat"
], ],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "Test1.4.7", "title": "Test1.4.7",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": ["servers.dat"], "update": ["servers.dat"],
"updateExclusions": [], "updateExclusions": [],
"updateShared": [], "updateShared": [],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "Test1.5.2", "title": "Test1.5.2",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": ["servers.dat"], "update": ["servers.dat"],
"updateExclusions": [], "updateExclusions": [],
"updateShared": [], "updateShared": [],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "Test1.6.4", "title": "Test1.6.4",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": ["servers.dat"], "update": ["servers.dat"],
"updateExclusions": [], "updateExclusions": [],
"updateShared": [], "updateShared": [],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "Test1.7.10", "title": "Test1.7.10",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": ["servers.dat"], "update": ["servers.dat"],
"updateExclusions": [], "updateExclusions": [],
"updateShared": [], "updateShared": [],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "Test1.7.2", "title": "Test1.7.2",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": ["servers.dat"], "update": ["servers.dat"],
"updateExclusions": [], "updateExclusions": [],
"updateShared": [], "updateShared": [],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "Test1.8.9", "title": "Test1.8.9",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": ["servers.dat"], "update": ["servers.dat"],
"updateExclusions": [], "updateExclusions": [],
"updateShared": [], "updateShared": [],

View file

@ -6,8 +6,14 @@
"info": "Информация о сервере", "info": "Информация о сервере",
"sortIndex": 0, "sortIndex": 0,
"title": "Test1.9.4", "title": "Test1.9.4",
"servers": [
{
"name": "----",
"serverAddress": "localhost", "serverAddress": "localhost",
"serverPort": 25565, "serverPort": 25565,
"isDefault": true
}
],
"update": ["servers.dat"], "update": ["servers.dat"],
"updateExclusions": [], "updateExclusions": [],
"updateShared": [], "updateShared": [],