mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FEATURE] ClientProfile compat flags, remove deprecated
This commit is contained in:
parent
43ffacdf5e
commit
0818b3037c
28 changed files with 54 additions and 858 deletions
|
@ -219,7 +219,14 @@ public void reload(ReloadType type) throws Exception {
|
||||||
});
|
});
|
||||||
logger.debug("Init components successful");
|
logger.debug("Init components successful");
|
||||||
}
|
}
|
||||||
|
if(!type.equals(ReloadType.NO_AUTH)) {
|
||||||
|
nettyServerSocketHandler.nettyServer.service.forEachActiveChannels((channel, wsHandler) -> {
|
||||||
|
Client client = wsHandler.getClient();
|
||||||
|
if(client.auth != null) {
|
||||||
|
client.auth = config.getAuthProviderPair(client.auth_id);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -236,7 +243,7 @@ public void invoke(String... args) throws Exception {
|
||||||
case "full" -> reload(ReloadType.FULL);
|
case "full" -> reload(ReloadType.FULL);
|
||||||
case "no_auth" -> reload(ReloadType.NO_AUTH);
|
case "no_auth" -> reload(ReloadType.NO_AUTH);
|
||||||
case "no_components" -> reload(ReloadType.NO_COMPONENTS);
|
case "no_components" -> reload(ReloadType.NO_COMPONENTS);
|
||||||
default -> reload(ReloadType.FULL);
|
default -> reload(ReloadType.NO_AUTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"features": [],
|
"features": ["profiles-rework"],
|
||||||
"info": []
|
"info": []
|
||||||
}
|
}
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.10.2",
|
|
||||||
"assetIndex": "1.10.2",
|
|
||||||
"assetDir": "asset1.10",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"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",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
"--tweakClass", "net.minecraftforge.fml.common.launcher.FMLTweaker",
|
|
||||||
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.11.2",
|
|
||||||
"assetIndex": "1.11.2",
|
|
||||||
"assetDir": "asset1.11",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"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",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
"--tweakClass", "net.minecraftforge.fml.common.launcher.FMLTweaker",
|
|
||||||
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.12.2",
|
|
||||||
"assetIndex": "1.12.2",
|
|
||||||
"assetDir": "asset1.12",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"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",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker",
|
|
||||||
"--tweakClass", "net.minecraftforge.fml.common.launcher.FMLTweaker"
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.13.1",
|
|
||||||
"assetIndex": "1.13.1",
|
|
||||||
"assetDir": "asset1.13.1",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"update": ["servers.dat"],
|
|
||||||
"updateExclusions": [],
|
|
||||||
"updateShared": [],
|
|
||||||
"updateVerify": [
|
|
||||||
"libraries", "natives", "mods",
|
|
||||||
"minecraft.jar", "forge.jar", "liteloader.jar"
|
|
||||||
],
|
|
||||||
"updateOptional": [
|
|
||||||
],
|
|
||||||
"updateFastCheck": true,
|
|
||||||
"useWhitelist": false,
|
|
||||||
"mainClass": "net.minecraft.client.main.Main",
|
|
||||||
"jvmArgs": [
|
|
||||||
"-Dfml.ignorePatchDiscrepancies=true",
|
|
||||||
"-Dfml.ignoreInvalidMinecraftCertificates=true",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.13",
|
|
||||||
"assetIndex": "1.13",
|
|
||||||
"assetDir": "asset1.13",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"update": ["servers.dat"],
|
|
||||||
"updateExclusions": [],
|
|
||||||
"updateShared": [],
|
|
||||||
"updateVerify": [
|
|
||||||
"libraries", "natives", "mods",
|
|
||||||
"minecraft.jar", "forge.jar", "liteloader.jar"
|
|
||||||
],
|
|
||||||
"updateOptional": [
|
|
||||||
],
|
|
||||||
"updateFastCheck": true,
|
|
||||||
"useWhitelist": false,
|
|
||||||
"mainClass": "net.minecraft.client.main.Main",
|
|
||||||
"jvmArgs": [
|
|
||||||
"-Dfml.ignorePatchDiscrepancies=true",
|
|
||||||
"-Dfml.ignoreInvalidMinecraftCertificates=true",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.14.4",
|
|
||||||
"assetIndex": "1.14.4",
|
|
||||||
"assetDir": "asset1.14.4",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"update": [
|
|
||||||
"servers.dat"
|
|
||||||
],
|
|
||||||
"updateExclusions": [],
|
|
||||||
"updateShared": [],
|
|
||||||
"updateVerify": [
|
|
||||||
"libraries",
|
|
||||||
"natives",
|
|
||||||
"minecraft.jar"
|
|
||||||
],
|
|
||||||
"updateOptional": [],
|
|
||||||
"updateFastCheck": true,
|
|
||||||
"useWhitelist": false,
|
|
||||||
"mainClass": "net.minecraft.client.main.Main",
|
|
||||||
"jvmArgs": [
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": [
|
|
||||||
"minecraft.jar",
|
|
||||||
"libraries"
|
|
||||||
],
|
|
||||||
"clientArgs": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.15.1",
|
|
||||||
"assetIndex": "1.15.1",
|
|
||||||
"assetDir": "asset1.15.1",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"update": [
|
|
||||||
"servers.dat"
|
|
||||||
],
|
|
||||||
"updateExclusions": [],
|
|
||||||
"updateShared": [],
|
|
||||||
"updateVerify": [
|
|
||||||
"libraries",
|
|
||||||
"natives",
|
|
||||||
"minecraft.jar"
|
|
||||||
],
|
|
||||||
"updateOptional": [],
|
|
||||||
"updateFastCheck": true,
|
|
||||||
"useWhitelist": false,
|
|
||||||
"mainClass": "net.minecraft.client.main.Main",
|
|
||||||
"jvmArgs": [
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": [
|
|
||||||
"minecraft.jar",
|
|
||||||
"libraries"
|
|
||||||
],
|
|
||||||
"clientArgs": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.15.2",
|
|
||||||
"assetIndex": "1.15.2",
|
|
||||||
"assetDir": "asset1.15.2",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"update": [
|
|
||||||
"servers.dat"
|
|
||||||
],
|
|
||||||
"updateExclusions": [],
|
|
||||||
"updateShared": [],
|
|
||||||
"updateVerify": [
|
|
||||||
"libraries",
|
|
||||||
"natives",
|
|
||||||
"minecraft.jar"
|
|
||||||
],
|
|
||||||
"updateOptional": [],
|
|
||||||
"updateFastCheck": true,
|
|
||||||
"useWhitelist": false,
|
|
||||||
"mainClass": "net.minecraft.client.main.Main",
|
|
||||||
"jvmArgs": [
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": [
|
|
||||||
"minecraft.jar",
|
|
||||||
"libraries"
|
|
||||||
],
|
|
||||||
"clientArgs": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.16.1",
|
|
||||||
"assetIndex": "1.16.1",
|
|
||||||
"assetDir": "asset1.16.1",
|
|
||||||
"dir": "HiTech",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "xxxxxxxx",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"update": [
|
|
||||||
"servers.dat"
|
|
||||||
],
|
|
||||||
"updateExclusions": [],
|
|
||||||
"updateShared": [],
|
|
||||||
"updateVerify": [
|
|
||||||
"libraries",
|
|
||||||
"natives",
|
|
||||||
"minecraft.jar"
|
|
||||||
],
|
|
||||||
"updateOptional": [],
|
|
||||||
"updateFastCheck": true,
|
|
||||||
"useWhitelist": false,
|
|
||||||
"mainClass": "net.minecraft.client.main.Main",
|
|
||||||
"jvmArgs": [
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": [
|
|
||||||
"minecraft.jar",
|
|
||||||
"libraries"
|
|
||||||
],
|
|
||||||
"clientArgs": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.4.7",
|
|
||||||
"assetIndex": "---",
|
|
||||||
"assetDir": "asset1.4.7",
|
|
||||||
"dir": "xxxxxxx",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "Test1.4.7",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"update": ["servers.dat"],
|
|
||||||
"updateExclusions": [],
|
|
||||||
"updateShared": [],
|
|
||||||
"updateVerify": [
|
|
||||||
"libraries", "natives", "mods",
|
|
||||||
"minecraft.jar"
|
|
||||||
],
|
|
||||||
"updateOptional": [
|
|
||||||
],
|
|
||||||
"updateFastCheck": true,
|
|
||||||
"useWhitelist": false,
|
|
||||||
"mainClass": "net.minecraft.launchwrapper.Launch",
|
|
||||||
"jvmArgs": [
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism",
|
|
||||||
"-Dlauncher.legacy.skinsURL=http://skins.minecraft.net/MinecraftSkins/%username%.png",
|
|
||||||
"-Dlauncher.legacy.cloaksURL=http://skins.minecraft.net/MinecraftCloaks/%username%.png"
|
|
||||||
],
|
|
||||||
"classPath": ["minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.5.2",
|
|
||||||
"assetIndex": "---",
|
|
||||||
"assetDir": "asset1.5.2",
|
|
||||||
"dir": "xxxxxxx",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "Test1.5.2",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"update": ["servers.dat"],
|
|
||||||
"updateExclusions": [],
|
|
||||||
"updateShared": [],
|
|
||||||
"updateVerify": [
|
|
||||||
"libraries", "natives", "mods",
|
|
||||||
"minecraft.jar"
|
|
||||||
],
|
|
||||||
"updateOptional": [
|
|
||||||
],
|
|
||||||
"updateFastCheck": true,
|
|
||||||
"useWhitelist": false,
|
|
||||||
"mainClass": "net.minecraft.launchwrapper.Launch",
|
|
||||||
"jvmArgs": [
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism",
|
|
||||||
"-Dlauncher.legacy.skinsURL=http://skins.minecraft.net/MinecraftSkins/%username%.png",
|
|
||||||
"-Dlauncher.legacy.cloaksURL=http://skins.minecraft.net/MinecraftCloaks/%username%.png"
|
|
||||||
],
|
|
||||||
"classPath": ["minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.6.4",
|
|
||||||
"assetIndex": "---",
|
|
||||||
"assetDir": "asset1.6.4",
|
|
||||||
"dir": "xxxxxxx",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "Test1.6.4",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"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",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism",
|
|
||||||
"-Dlauncher.legacy.skinsURL=http://skins.minecraft.net/MinecraftSkins/%username%.png",
|
|
||||||
"-Dlauncher.legacy.cloaksURL=http://skins.minecraft.net/MinecraftCloaks/%username%.png"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
"--tweakClass", "cpw.mods.fml.common.launcher.FMLTweaker",
|
|
||||||
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.7.10",
|
|
||||||
"assetIndex": "1.7.10",
|
|
||||||
"assetDir": "asset1.7.10",
|
|
||||||
"dir": "xxxxxxx",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "Test1.7.10",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"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",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
"--tweakClass", "cpw.mods.fml.common.launcher.FMLTweaker",
|
|
||||||
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.7.2",
|
|
||||||
"assetIndex": "1.7.2",
|
|
||||||
"assetDir": "asset1.7.2",
|
|
||||||
"dir": "xxxxxxx",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "Test1.7.2",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"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",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
"--tweakClass", "cpw.mods.fml.common.launcher.FMLTweaker",
|
|
||||||
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.8.9",
|
|
||||||
"assetIndex": "1.8.9",
|
|
||||||
"assetDir": "asset1.8.9",
|
|
||||||
"dir": "xxxxxxx",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "Test1.8.9",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"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",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
"--tweakClass", "net.minecraftforge.fml.common.launcher.FMLTweaker",
|
|
||||||
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.9.4",
|
|
||||||
"assetIndex": "1.9.4",
|
|
||||||
"assetDir": "asset1.9.4",
|
|
||||||
"dir": "xxxxxxx",
|
|
||||||
"info": "Информация о сервере",
|
|
||||||
"sortIndex": 0,
|
|
||||||
"title": "Test1.9.4",
|
|
||||||
"servers": [
|
|
||||||
{
|
|
||||||
"name": "----",
|
|
||||||
"serverAddress": "localhost",
|
|
||||||
"serverPort": 25565,
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"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",
|
|
||||||
"-XX:+UseConcMarkSweepGC",
|
|
||||||
"-XX:+CMSIncrementalMode",
|
|
||||||
"-XX:-UseAdaptiveSizePolicy",
|
|
||||||
"-Xmn128M",
|
|
||||||
"-XX:+DisableAttachMechanism"
|
|
||||||
],
|
|
||||||
"classPath": ["forge.jar", "liteloader.jar", "minecraft.jar", "libraries"],
|
|
||||||
"clientArgs": [
|
|
||||||
"--tweakClass", "net.minecraftforge.fml.common.launcher.FMLTweaker",
|
|
||||||
"--tweakClass", "com.mumfrey.liteloader.launch.LiteLoaderTweaker"
|
|
||||||
],
|
|
||||||
"optionalJVMArgs": [],
|
|
||||||
"optionalClientArgs": [],
|
|
||||||
"optionalClassPath": [],
|
|
||||||
"whitelist": []
|
|
||||||
}
|
|
|
@ -107,7 +107,6 @@ public static void main(String[] args) throws Throwable {
|
||||||
} else if (params.session != null) {
|
} else if (params.session != null) {
|
||||||
throw new UnsupportedOperationException("Legacy session not supported");
|
throw new UnsupportedOperationException("Legacy session not supported");
|
||||||
}
|
}
|
||||||
checkJVMBitsAndVersion(params.profile.getMinJavaVersion(), params.profile.getRecommendJavaVersion(), params.profile.getMaxJavaVersion(), params.profile.isWarnMissJavaVersion());
|
|
||||||
LauncherEngine.modulesManager.invokeEvent(new ClientProcessInitPhase(engine, params));
|
LauncherEngine.modulesManager.invokeEvent(new ClientProcessInitPhase(engine, params));
|
||||||
|
|
||||||
Path clientDir = Paths.get(params.clientDir);
|
Path clientDir = Paths.get(params.clientDir);
|
||||||
|
@ -174,15 +173,6 @@ public static void main(String[] args) throws Throwable {
|
||||||
AuthService.username = params.playerProfile.username;
|
AuthService.username = params.playerProfile.username;
|
||||||
AuthService.uuid = params.playerProfile.uuid;
|
AuthService.uuid = params.playerProfile.uuid;
|
||||||
KeyService.serverRsaPublicKey = Launcher.getConfig().rsaPublicKey;
|
KeyService.serverRsaPublicKey = Launcher.getConfig().rsaPublicKey;
|
||||||
if (params.profile.getRuntimeInClientConfig() != ClientProfile.RuntimeInClientConfig.NONE) {
|
|
||||||
CommonHelper.newThread("Client Launcher Thread", true, () -> {
|
|
||||||
try {
|
|
||||||
engine.start(args);
|
|
||||||
} catch (Throwable throwable) {
|
|
||||||
LogHelper.error(throwable);
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
}
|
|
||||||
LauncherEngine.modulesManager.invokeEvent(new ClientProcessReadyEvent(engine, params));
|
LauncherEngine.modulesManager.invokeEvent(new ClientProcessReadyEvent(engine, params));
|
||||||
LogHelper.debug("Starting JVM and client WatchService");
|
LogHelper.debug("Starting JVM and client WatchService");
|
||||||
FileNameMatcher assetMatcher = profile.getAssetUpdateMatcher();
|
FileNameMatcher assetMatcher = profile.getAssetUpdateMatcher();
|
||||||
|
@ -268,28 +258,6 @@ public static void verifyHDir(Path dir, HashedDir hdir, FileNameMatcher matcher,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean checkJVMBitsAndVersion(int minVersion, int recommendVersion, int maxVersion, boolean showMessage) {
|
|
||||||
boolean ok = true;
|
|
||||||
if (JVMHelper.JVM_BITS == 64 && JVMHelper.ARCH_TYPE == JVMHelper.ARCH.X86) {
|
|
||||||
String error = "У Вас установлена Java x64, но Ваша система определена как x32. Установите Java правильной разрядности";
|
|
||||||
LogHelper.error(error);
|
|
||||||
if (showMessage)
|
|
||||||
JOptionPane.showMessageDialog(null, error);
|
|
||||||
ok = false;
|
|
||||||
}
|
|
||||||
String jvmVersion = JVMHelper.RUNTIME_MXBEAN.getVmVersion();
|
|
||||||
LogHelper.info(jvmVersion);
|
|
||||||
int version = JVMHelper.getVersion();
|
|
||||||
if (version < minVersion || version > maxVersion) {
|
|
||||||
String error = String.format("У Вас установлена Java %d, но этот клиент требует Java %d", JVMHelper.getVersion(), recommendVersion);
|
|
||||||
LogHelper.error(error);
|
|
||||||
if (showMessage)
|
|
||||||
JOptionPane.showMessageDialog(null, error);
|
|
||||||
ok = false;
|
|
||||||
}
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static LinkedList<Path> resolveClassPathList(Path clientDir, String... classPath) throws IOException {
|
private static LinkedList<Path> resolveClassPathList(Path clientDir, String... classPath) throws IOException {
|
||||||
return resolveClassPathStream(clientDir, classPath).collect(Collectors.toCollection(LinkedList::new));
|
return resolveClassPathStream(clientDir, classPath).collect(Collectors.toCollection(LinkedList::new));
|
||||||
}
|
}
|
||||||
|
@ -353,7 +321,7 @@ private static void launch(ClientProfile profile, ClientLauncherProcess.ClientPa
|
||||||
List<String> compatClasses = profile.getCompatClasses();
|
List<String> compatClasses = profile.getCompatClasses();
|
||||||
for (String e : compatClasses) {
|
for (String e : compatClasses) {
|
||||||
Class<?> clazz = classLoader.loadClass(e);
|
Class<?> clazz = classLoader.loadClass(e);
|
||||||
MethodHandle runMethod = MethodHandles.publicLookup().findStatic(clazz, "run", MethodType.methodType(void.class));
|
MethodHandle runMethod = MethodHandles.lookup().findStatic(clazz, "run", MethodType.methodType(void.class));
|
||||||
runMethod.invoke();
|
runMethod.invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,9 +76,14 @@ public ClientLauncherProcess(Path clientDir, Path assetDir, JavaHelper.JavaVersi
|
||||||
this.params.clientDir = this.workDir.toString();
|
this.params.clientDir = this.workDir.toString();
|
||||||
this.params.resourcePackDir = resourcePackDir.toAbsolutePath().toString();
|
this.params.resourcePackDir = resourcePackDir.toAbsolutePath().toString();
|
||||||
this.params.assetDir = assetDir.toAbsolutePath().toString();
|
this.params.assetDir = assetDir.toAbsolutePath().toString();
|
||||||
Path nativesPath = workDir.resolve("natives").resolve(JVMHelper.OS_TYPE.name).resolve(javaVersion.arch.name);
|
Path nativesPath;
|
||||||
if (!Files.isDirectory(nativesPath)) {
|
if(profile.hasFlag(ClientProfile.CompatibilityFlags.LEGACY_NATIVES_DIR)) {
|
||||||
nativesPath = workDir.resolve("natives");
|
nativesPath = workDir.resolve("natives");
|
||||||
|
} else {
|
||||||
|
nativesPath = workDir.resolve("natives").resolve(JVMHelper.OS_TYPE.name).resolve(javaVersion.arch.name);
|
||||||
|
}
|
||||||
|
if (!Files.isDirectory(nativesPath)) {
|
||||||
|
throw new RuntimeException(String.format("Natives dir %s not exist! Your operating system or architecture not supported", nativesPath.toAbsolutePath()));
|
||||||
}
|
}
|
||||||
this.params.nativesDir = nativesPath.toString();
|
this.params.nativesDir = nativesPath.toString();
|
||||||
this.params.profile = profile;
|
this.params.profile = profile;
|
||||||
|
@ -123,16 +128,6 @@ private void applyClientProfile() {
|
||||||
}
|
}
|
||||||
this.jvmModules.addAll(this.params.profile.getModules());
|
this.jvmModules.addAll(this.params.profile.getModules());
|
||||||
this.jvmModulesPaths.addAll(this.params.profile.getModulePath());
|
this.jvmModulesPaths.addAll(this.params.profile.getModulePath());
|
||||||
if (this.params.profile.getRuntimeInClientConfig() != ClientProfile.RuntimeInClientConfig.NONE) {
|
|
||||||
jvmModules.add("javafx.base");
|
|
||||||
jvmModules.add("javafx.graphics");
|
|
||||||
jvmModules.add("javafx.fxml");
|
|
||||||
jvmModules.add("javafx.controls");
|
|
||||||
jvmModules.add("javafx.swing");
|
|
||||||
jvmModules.add("javafx.media");
|
|
||||||
jvmModules.add("javafx.web");
|
|
||||||
}
|
|
||||||
|
|
||||||
LauncherEngine.modulesManager.invokeEvent(new ClientProcessBuilderCreateEvent(this));
|
LauncherEngine.modulesManager.invokeEvent(new ClientProcessBuilderCreateEvent(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,13 +62,10 @@ public final class ClientProfile implements Comparable<ClientProfile> {
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
private List<ServerProfile> servers;
|
private List<ServerProfile> servers;
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
private SecurityManagerConfig securityManagerConfig;
|
|
||||||
@LauncherNetworkAPI
|
|
||||||
private ClassLoaderConfig classLoaderConfig;
|
private ClassLoaderConfig classLoaderConfig;
|
||||||
|
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
private SignedClientConfig signedClientConfig;
|
private List<CompatibilityFlags> flags;
|
||||||
@LauncherNetworkAPI
|
|
||||||
private RuntimeInClientConfig runtimeInClientConfig;
|
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
private int recommendJavaVersion = 8;
|
private int recommendJavaVersion = 8;
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
|
@ -76,8 +73,6 @@ public final class ClientProfile implements Comparable<ClientProfile> {
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
private int maxJavaVersion = 999;
|
private int maxJavaVersion = 999;
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
private boolean warnMissJavaVersion = true;
|
|
||||||
@LauncherNetworkAPI
|
|
||||||
private ProfileDefaultSettings settings = new ProfileDefaultSettings();
|
private ProfileDefaultSettings settings = new ProfileDefaultSettings();
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
private boolean limited;
|
private boolean limited;
|
||||||
|
@ -99,13 +94,11 @@ public ClientProfile() {
|
||||||
compatClasses = new ArrayList<>();
|
compatClasses = new ArrayList<>();
|
||||||
properties = new HashMap<>();
|
properties = new HashMap<>();
|
||||||
servers = new ArrayList<>(1);
|
servers = new ArrayList<>(1);
|
||||||
securityManagerConfig = SecurityManagerConfig.CLIENT;
|
|
||||||
classLoaderConfig = ClassLoaderConfig.LAUNCHER;
|
classLoaderConfig = ClassLoaderConfig.LAUNCHER;
|
||||||
signedClientConfig = SignedClientConfig.NONE;
|
flags = new ArrayList<>();
|
||||||
runtimeInClientConfig = RuntimeInClientConfig.NONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClientProfile(List<String> update, List<String> updateExclusions, List<String> updateShared, List<String> updateVerify, Set<OptionalFile> updateOptional, List<String> jvmArgs, List<String> classPath, List<String> modulePath, List<String> modules, List<String> altClassPath, List<String> clientArgs, List<String> compatClasses, Map<String, String> properties, List<ServerProfile> servers, SecurityManagerConfig securityManagerConfig, ClassLoaderConfig classLoaderConfig, SignedClientConfig signedClientConfig, RuntimeInClientConfig runtimeInClientConfig, String version, String assetIndex, String dir, String assetDir, int recommendJavaVersion, int minJavaVersion, int maxJavaVersion, boolean warnMissJavaVersion, ProfileDefaultSettings settings, int sortIndex, UUID uuid, String title, String info, String mainClass) {
|
public ClientProfile(List<String> update, List<String> updateExclusions, List<String> updateShared, List<String> updateVerify, Set<OptionalFile> updateOptional, List<String> jvmArgs, List<String> classPath, List<String> modulePath, List<String> modules, List<String> altClassPath, List<String> clientArgs, List<String> compatClasses, Map<String, String> properties, List<ServerProfile> servers, ClassLoaderConfig classLoaderConfig, List<CompatibilityFlags> flags, String version, String assetIndex, String dir, String assetDir, int recommendJavaVersion, int minJavaVersion, int maxJavaVersion, ProfileDefaultSettings settings, int sortIndex, UUID uuid, String title, String info, String mainClass) {
|
||||||
this.update = update;
|
this.update = update;
|
||||||
this.updateExclusions = updateExclusions;
|
this.updateExclusions = updateExclusions;
|
||||||
this.updateShared = updateShared;
|
this.updateShared = updateShared;
|
||||||
|
@ -120,10 +113,7 @@ public ClientProfile(List<String> update, List<String> updateExclusions, List<St
|
||||||
this.compatClasses = compatClasses;
|
this.compatClasses = compatClasses;
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
this.servers = servers;
|
this.servers = servers;
|
||||||
this.securityManagerConfig = securityManagerConfig;
|
|
||||||
this.classLoaderConfig = classLoaderConfig;
|
this.classLoaderConfig = classLoaderConfig;
|
||||||
this.signedClientConfig = signedClientConfig;
|
|
||||||
this.runtimeInClientConfig = runtimeInClientConfig;
|
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.assetIndex = assetIndex;
|
this.assetIndex = assetIndex;
|
||||||
this.dir = dir;
|
this.dir = dir;
|
||||||
|
@ -131,13 +121,13 @@ public ClientProfile(List<String> update, List<String> updateExclusions, List<St
|
||||||
this.recommendJavaVersion = recommendJavaVersion;
|
this.recommendJavaVersion = recommendJavaVersion;
|
||||||
this.minJavaVersion = minJavaVersion;
|
this.minJavaVersion = minJavaVersion;
|
||||||
this.maxJavaVersion = maxJavaVersion;
|
this.maxJavaVersion = maxJavaVersion;
|
||||||
this.warnMissJavaVersion = warnMissJavaVersion;
|
|
||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
this.sortIndex = sortIndex;
|
this.sortIndex = sortIndex;
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.info = info;
|
this.info = info;
|
||||||
this.mainClass = mainClass;
|
this.mainClass = mainClass;
|
||||||
|
this.flags = flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerProfile getDefaultServerProfile() {
|
public ServerProfile getDefaultServerProfile() {
|
||||||
|
@ -245,10 +235,6 @@ public int getMaxJavaVersion() {
|
||||||
return maxJavaVersion;
|
return maxJavaVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWarnMissJavaVersion() {
|
|
||||||
return warnMissJavaVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProfileDefaultSettings getSettings() {
|
public ProfileDefaultSettings getSettings() {
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
@ -331,6 +317,10 @@ public void setUUID(UUID uuid) {
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasFlag(CompatibilityFlags flag) {
|
||||||
|
return flags.contains(flag);
|
||||||
|
}
|
||||||
|
|
||||||
public void verify() {
|
public void verify() {
|
||||||
// Version
|
// Version
|
||||||
getVersion();
|
getVersion();
|
||||||
|
@ -432,18 +422,14 @@ public void setClassLoaderConfig(ClassLoaderConfig classLoaderConfig) {
|
||||||
this.classLoaderConfig = classLoaderConfig;
|
this.classLoaderConfig = classLoaderConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RuntimeInClientConfig getRuntimeInClientConfig() {
|
|
||||||
return runtimeInClientConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRuntimeInClientConfig(RuntimeInClientConfig runtimeInClientConfig) {
|
|
||||||
this.runtimeInClientConfig = runtimeInClientConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isLimited() {
|
public boolean isLimited() {
|
||||||
return limited;
|
return limited;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<CompatibilityFlags> getFlags() {
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
public enum Version {
|
public enum Version {
|
||||||
MC125("1.2.5", 29),
|
MC125("1.2.5", 29),
|
||||||
MC147("1.4.7", 51),
|
MC147("1.4.7", 51),
|
||||||
|
@ -513,20 +499,12 @@ public String toString() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SecurityManagerConfig {
|
|
||||||
NONE, CLIENT, LAUNCHER, MIXED
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum ClassLoaderConfig {
|
public enum ClassLoaderConfig {
|
||||||
AGENT, LAUNCHER, MODULE, SYSTEM_ARGS
|
AGENT, LAUNCHER, MODULE, SYSTEM_ARGS
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SignedClientConfig {
|
public enum CompatibilityFlags {
|
||||||
NONE, SIGNED
|
LEGACY_NATIVES_DIR
|
||||||
}
|
|
||||||
|
|
||||||
public enum RuntimeInClientConfig {
|
|
||||||
NONE, BASIC, FULL
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
|
|
|
@ -19,10 +19,8 @@ public class ClientProfileBuilder {
|
||||||
private List<String> compatClasses = new ArrayList<>();
|
private List<String> compatClasses = new ArrayList<>();
|
||||||
private Map<String, String> properties = new HashMap<>();
|
private Map<String, String> properties = new HashMap<>();
|
||||||
private List<ClientProfile.ServerProfile> servers = new ArrayList<>();
|
private List<ClientProfile.ServerProfile> servers = new ArrayList<>();
|
||||||
private ClientProfile.SecurityManagerConfig securityManagerConfig = ClientProfile.SecurityManagerConfig.LAUNCHER;
|
|
||||||
private ClientProfile.ClassLoaderConfig classLoaderConfig = ClientProfile.ClassLoaderConfig.LAUNCHER;
|
private ClientProfile.ClassLoaderConfig classLoaderConfig = ClientProfile.ClassLoaderConfig.LAUNCHER;
|
||||||
private ClientProfile.SignedClientConfig signedClientConfig = ClientProfile.SignedClientConfig.NONE;
|
private List<ClientProfile.CompatibilityFlags> flags = new ArrayList<>();
|
||||||
private ClientProfile.RuntimeInClientConfig runtimeInClientConfig = ClientProfile.RuntimeInClientConfig.NONE;
|
|
||||||
private String version;
|
private String version;
|
||||||
private String assetIndex;
|
private String assetIndex;
|
||||||
private String dir;
|
private String dir;
|
||||||
|
@ -30,7 +28,6 @@ public class ClientProfileBuilder {
|
||||||
private int recommendJavaVersion = 8;
|
private int recommendJavaVersion = 8;
|
||||||
private int minJavaVersion = 8;
|
private int minJavaVersion = 8;
|
||||||
private int maxJavaVersion = 999;
|
private int maxJavaVersion = 999;
|
||||||
private boolean warnMissJavaVersion = true;
|
|
||||||
private ClientProfile.ProfileDefaultSettings settings = new ClientProfile.ProfileDefaultSettings();
|
private ClientProfile.ProfileDefaultSettings settings = new ClientProfile.ProfileDefaultSettings();
|
||||||
private int sortIndex;
|
private int sortIndex;
|
||||||
private UUID uuid;
|
private UUID uuid;
|
||||||
|
@ -98,26 +95,11 @@ public ClientProfileBuilder setServers(List<ClientProfile.ServerProfile> servers
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClientProfileBuilder setSecurityManagerConfig(ClientProfile.SecurityManagerConfig securityManagerConfig) {
|
|
||||||
this.securityManagerConfig = securityManagerConfig;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ClientProfileBuilder setClassLoaderConfig(ClientProfile.ClassLoaderConfig classLoaderConfig) {
|
public ClientProfileBuilder setClassLoaderConfig(ClientProfile.ClassLoaderConfig classLoaderConfig) {
|
||||||
this.classLoaderConfig = classLoaderConfig;
|
this.classLoaderConfig = classLoaderConfig;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClientProfileBuilder setSignedClientConfig(ClientProfile.SignedClientConfig signedClientConfig) {
|
|
||||||
this.signedClientConfig = signedClientConfig;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ClientProfileBuilder setRuntimeInClientConfig(ClientProfile.RuntimeInClientConfig runtimeInClientConfig) {
|
|
||||||
this.runtimeInClientConfig = runtimeInClientConfig;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ClientProfileBuilder setVersion(String version) {
|
public ClientProfileBuilder setVersion(String version) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
return this;
|
return this;
|
||||||
|
@ -163,11 +145,6 @@ public ClientProfileBuilder setMaxJavaVersion(int maxJavaVersion) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClientProfileBuilder setWarnMissJavaVersion(boolean warnMissJavaVersion) {
|
|
||||||
this.warnMissJavaVersion = warnMissJavaVersion;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ClientProfileBuilder setSettings(ClientProfile.ProfileDefaultSettings settings) {
|
public ClientProfileBuilder setSettings(ClientProfile.ProfileDefaultSettings settings) {
|
||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
return this;
|
return this;
|
||||||
|
@ -198,7 +175,12 @@ public ClientProfileBuilder setMainClass(String mainClass) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ClientProfileBuilder setFlags(List<ClientProfile.CompatibilityFlags> flags) {
|
||||||
|
this.flags = flags;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public ClientProfile createClientProfile() {
|
public ClientProfile createClientProfile() {
|
||||||
return new ClientProfile(update, updateExclusions, updateShared, updateVerify, updateOptional, jvmArgs, classPath, modulePath, modules, altClassPath, clientArgs, compatClasses, properties, servers, securityManagerConfig, classLoaderConfig, signedClientConfig, runtimeInClientConfig, version, assetIndex, dir, assetDir, recommendJavaVersion, minJavaVersion, maxJavaVersion, warnMissJavaVersion, settings, sortIndex, uuid, title, info, mainClass);
|
return new ClientProfile(update, updateExclusions, updateShared, updateVerify, updateOptional, jvmArgs, classPath, modulePath, modules, altClassPath, clientArgs, compatClasses, properties, servers, classLoaderConfig, flags, version, assetIndex, dir, assetDir, recommendJavaVersion, minJavaVersion, maxJavaVersion, settings, sortIndex, uuid, title, info, mainClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -11,8 +11,6 @@ public final class PlayerProfile {
|
||||||
|
|
||||||
public final UUID uuid;
|
public final UUID uuid;
|
||||||
public final String username;
|
public final String username;
|
||||||
@Deprecated
|
|
||||||
public final Texture skin, cloak;
|
|
||||||
public final Map<String, Texture> assets;
|
public final Map<String, Texture> assets;
|
||||||
public final Map<String, String> properties;
|
public final Map<String, String> properties;
|
||||||
|
|
||||||
|
@ -26,8 +24,6 @@ public PlayerProfile(UUID uuid, String username, Texture skin, Texture cloak) {
|
||||||
public PlayerProfile(UUID uuid, String username, Texture skin, Texture cloak, Map<String, String> properties) {
|
public PlayerProfile(UUID uuid, String username, Texture skin, Texture cloak, Map<String, String> properties) {
|
||||||
this.uuid = Objects.requireNonNull(uuid, "uuid");
|
this.uuid = Objects.requireNonNull(uuid, "uuid");
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.skin = skin;
|
|
||||||
this.cloak = cloak;
|
|
||||||
this.assets = new HashMap<>();
|
this.assets = new HashMap<>();
|
||||||
if (skin != null) {
|
if (skin != null) {
|
||||||
this.assets.put("SKIN", skin);
|
this.assets.put("SKIN", skin);
|
||||||
|
@ -43,8 +39,6 @@ public PlayerProfile(UUID uuid, String username, Map<String, Texture> assets, Ma
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.assets = assets;
|
this.assets = assets;
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
this.skin = assets.get("SKIN");
|
|
||||||
this.cloak = assets.get("CAPE");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlayerProfile newOfflineProfile(String username) {
|
public static PlayerProfile newOfflineProfile(String username) {
|
||||||
|
|
|
@ -28,6 +28,7 @@ public abstract class ClientWebSocketService extends ClientJSONPoint {
|
||||||
private static boolean resultsRegistered = false;
|
private static boolean resultsRegistered = false;
|
||||||
public final Gson gson;
|
public final Gson gson;
|
||||||
public final Boolean onConnect;
|
public final Boolean onConnect;
|
||||||
|
public final Object waitObject = new Object();
|
||||||
public OnCloseCallback onCloseCallback;
|
public OnCloseCallback onCloseCallback;
|
||||||
public ReconnectCallback reconnectCallback;
|
public ReconnectCallback reconnectCallback;
|
||||||
|
|
||||||
|
@ -71,8 +72,8 @@ void onDisconnect() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void onOpen() {
|
void onOpen() {
|
||||||
synchronized (onConnect) {
|
synchronized (waitObject) {
|
||||||
onConnect.notifyAll();
|
waitObject.notifyAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +81,6 @@ public void registerRequests() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public void registerResults() {
|
public void registerResults() {
|
||||||
if (!resultsRegistered) {
|
if (!resultsRegistered) {
|
||||||
results.register("auth", AuthRequestEvent.class);
|
results.register("auth", AuthRequestEvent.class);
|
||||||
|
|
|
@ -51,13 +51,16 @@ public UniversalJsonAdapter(ProviderMap<R> providerMap, String name, String PROP
|
||||||
|
|
||||||
public R deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
public R deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||||
String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString();
|
String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString();
|
||||||
|
if(typename == null) {
|
||||||
|
throw new JsonParseException(String.format("%s: missing type property", name));
|
||||||
|
}
|
||||||
Class<? extends R> cls = providerMap.getClass(typename);
|
Class<? extends R> cls = providerMap.getClass(typename);
|
||||||
if (cls == null) {
|
if (cls == null) {
|
||||||
//if (printErrorIfUnknownType) LogHelper.error("%s %s not found", name, typename);
|
|
||||||
if (defaultClass != null) {
|
if (defaultClass != null) {
|
||||||
return context.deserialize(json, defaultClass);
|
return context.deserialize(json, defaultClass);
|
||||||
|
} else {
|
||||||
|
throw new JsonParseException(String.format("%s: type %s not registered", name, typename));
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
return context.deserialize(json, cls);
|
return context.deserialize(json, cls);
|
||||||
}
|
}
|
||||||
|
@ -72,6 +75,8 @@ public JsonElement serialize(R src, Type typeOfSrc, JsonSerializationContext con
|
||||||
}
|
}
|
||||||
if (classPath != null) {
|
if (classPath != null) {
|
||||||
jo.add(PROP_NAME, new JsonPrimitive(classPath));
|
jo.add(PROP_NAME, new JsonPrimitive(classPath));
|
||||||
|
} else {
|
||||||
|
throw new JsonParseException(String.format("Class %s not registered", src.getClass().getName()));
|
||||||
}
|
}
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
public final class Version implements Comparable<Version> {
|
public final class Version implements Comparable<Version> {
|
||||||
|
|
||||||
public static final int MAJOR = 5;
|
public static final int MAJOR = 5;
|
||||||
public static final int MINOR = 3;
|
public static final int MINOR = 4;
|
||||||
public static final int PATCH = 6;
|
public static final int PATCH = 0;
|
||||||
public static final int BUILD = 1;
|
public static final int BUILD = 1;
|
||||||
public static final Version.Type RELEASE = Type.DEV;
|
public static final Version.Type RELEASE = Type.EXPERIMENTAL;
|
||||||
public final int major;
|
public final int major;
|
||||||
public final int minor;
|
public final int minor;
|
||||||
public final int patch;
|
public final int patch;
|
||||||
|
|
|
@ -26,7 +26,6 @@ public final class JVMHelper {
|
||||||
public static final String OS_VERSION = OPERATING_SYSTEM_MXBEAN.getVersion();
|
public static final String OS_VERSION = OPERATING_SYSTEM_MXBEAN.getVersion();
|
||||||
public static final ARCH ARCH_TYPE = getArch(System.getProperty("os.arch"));
|
public static final ARCH ARCH_TYPE = getArch(System.getProperty("os.arch"));
|
||||||
public static final int JVM_BITS = Integer.parseInt(System.getProperty("sun.arch.data.model"));
|
public static final int JVM_BITS = Integer.parseInt(System.getProperty("sun.arch.data.model"));
|
||||||
public static final SecurityManager SECURITY_MANAGER = System.getSecurityManager();
|
|
||||||
// Public static fields
|
// Public static fields
|
||||||
public static final Runtime RUNTIME = Runtime.getRuntime();
|
public static final Runtime RUNTIME = Runtime.getRuntime();
|
||||||
public static final ClassLoader LOADER = ClassLoader.getSystemClassLoader();
|
public static final ClassLoader LOADER = ClassLoader.getSystemClassLoader();
|
||||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
||||||
Subproject commit 1f34a8f8bcb6399469da0e27e8d3e7e3a20d3e00
|
Subproject commit 2ea978f02d44893b7f02ae63eac3d3a07a1e0e11
|
Loading…
Reference in a new issue