Исправления DownloadClientCommand и стандартных профилей 1.12.2 и 1.7.10

This commit is contained in:
Gravit 2018-12-24 14:58:28 +07:00
parent c65124a21e
commit f58d387d92
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
5 changed files with 66 additions and 87 deletions

View file

@ -36,7 +36,7 @@ public void invoke(String... args) throws Exception {
CommonHelper.newThread("Netty Server", true, handler).start();
}
if (args[0].equals("profile")) {
ClientProfile profile = new ClientProfile("1.7.10","asset1.7.10",0,"Test1.7.10","localhost",25535,true,false,"net.minecraft.launchwrapper.Launch");
ClientProfile profile = new ClientProfile("1.7.10","asset1.7.10",0,"Test1.7.10","localhost",25565,true,false,"net.minecraft.launchwrapper.Launch");
try(Writer writer = IOHelper.newWriter(LaunchServer.server.dir.resolve("profiles").resolve("Test.cfg")))
{
Launcher.gson.toJson(profile,writer);

View file

@ -56,6 +56,7 @@ public void invoke(String... args) throws IOException, CommandException {
client = Launcher.gson.fromJson(reader,ClientProfile.class);
}
client.setTitle(dirName);
client.setDir(dirName);
try (BufferedWriter writer = IOHelper.newWriter(IOHelper.resolveIncremental(server.profilesDir,
dirName, "cfg"))) {
Launcher.gson.toJson(client,writer);

View file

@ -1,50 +1,41 @@
version: "1.12.2";
assetIndex: "1.12.2"; # 1.7.10+ only
# Runtime-dependent params
dir: "XXXXX";
assetDir: "asset1.12";
# Client params
sortIndex: 0;
title: "XXXXX";
serverAddress: "server.tld";
serverPort: 25565;
# Updater and client watch service
updateFastCheck: true;
update: [
"servers.dat"
];
updateVerify: [
"libraries", "natives", "mods",
"minecraft.jar", "forge.jar", "liteloader.jar"
];
updateExclusions: [];
updateShared: [];
updateOptional: [];
enabledOptional: [];
useWhitelist: false;
whitelist: [];
# Client launcher params
mainClass: "net.minecraft.launchwrapper.Launch";
classPath: [ "forge.jar", "liteloader.jar", "minecraft.jar", "libraries" ];
jvmArgs: [
{
"version": "1.12.2",
"assetIndex": "1.12.2",
"assetDir": "asset1.12",
"dir": "HiTech",
"sortIndex": 0,
"title": "xxxxxxxx",
"serverAddress": "localhost",
"serverPort": 25565,
"update": ["servers.dat"],
"updateExclusions": [
"mods/OpenSecurity",
"mods/VoxelMods",
"mods/railcraft"
],
"updateShared": [],
"updateVerify": [
"libraries", "natives", "mods",
"minecraft.jar", "forge.jar", "liteloader.jar"
],
"updateOptional": [
],
"updateFastCheck": true,
"useWhitelist": false,
"mainClass": "net.minecraft.launchwrapper.Launch",
"jvmArgs": [
"-Dfml.ignorePatchDiscrepancies=true",
"-Dfml.ignoreInvalidMinecraftCertificates=true",
# Some options from Mojang's launcher
"-XX:+UseConcMarkSweepGC",
"-XX:+CMSIncrementalMode",
"-XX:-UseAdaptiveSizePolicy",
"-Xmn128M",
# JVM Attach protection
"-XX:+DisableAttachMechanism"
];
clientArgs: [
],
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
"clientArgs": [
"--tweakClass", "net.minecraftforge.fml.common.launcher.FMLTweaker",
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
];
],
"whitelist": []
}

View file

@ -1,54 +1,37 @@
version: "1.7.10";
assetIndex: "1.7.10"; # 1.7.10+ only
# Runtime-dependent params
dir: "XXXXX";
assetDir: "asset1.7.10";
# Client params
sortIndex: 0;
title: "XXXXX";
serverAddress: "server.tld";
serverPort: 25565;
# Updater and client watch service
updateFastCheck: true;
update: [
"servers.dat"
];
updateVerify: [
"libraries", "natives", "mods",
"minecraft.jar", "forge.jar", "liteloader.jar"
];
updateExclusions: [
# "mods/carpentersblocks",
# "mods/ic2",
# "mods/railcraft"
];
updateShared: [];
updateOptional: [];
enabledOptional: [];
useWhitelist: false;
whitelist: [];
# Client launcher params
mainClass: "net.minecraft.launchwrapper.Launch";
classPath: [ "forge.jar", "liteloader.jar", "minecraft.jar", "libraries" ];
jvmArgs: [
{
"version": "1.7.10",
"assetIndex": "1.7.10",
"assetDir": "asset1.7.10",
"dir": "xxxxxxx",
"sortIndex": 0,
"title": "Test1.7.10",
"serverAddress": "localhost",
"serverPort": 25565,
"update": ["servers.dat"],
"updateExclusions": [],
"updateShared": [],
"updateVerify": [
"libraries", "natives", "mods",
"minecraft.jar", "forge.jar", "liteloader.jar"
],
"updateOptional": [
],
"updateFastCheck": true,
"useWhitelist": false,
"mainClass": "net.minecraft.launchwrapper.Launch",
"jvmArgs": [
"-Dfml.ignorePatchDiscrepancies=true",
"-Dfml.ignoreInvalidMinecraftCertificates=true",
# Some options from Mojang's launcher
"-XX:+UseConcMarkSweepGC",
"-XX:+CMSIncrementalMode",
"-XX:-UseAdaptiveSizePolicy",
"-Xmn128M",
# JVM Attach protection
"-XX:+DisableAttachMechanism"
];
clientArgs: [
],
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
"clientArgs": [
"--tweakClass", "cpw.mods.fml.common.launcher.FMLTweaker",
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
];
],
"whitelist": []
}

View file

@ -179,6 +179,10 @@ public String[] getClientArgs() {
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
@LauncherAPI
public String getAssetDir() {
return assetDir;