Fix a NullPointerException when launching ≤ 1.6.4
This commit is contained in:
1 parent
bf619cbe62
commit
33b00e417c
3 files changed
+11
-7
No files matched your search
@@ -62,12 +62,14 @@ public class PLaunchApp {
|
||||
}
|
||||
System.out.println("Launching Minecraft " + mVersion.id);
|
||||
String configPath;
|
||||
if (mVersion.logging.client.file.id.equals("client-1.12.xml")) {
|
||||
configPath = Tools.DIR_BUNDLE + "/log4j-rce-patch-1.12.xml";
|
||||
} else {
|
||||
configPath = Tools.DIR_GAME_NEW + "/" + mVersion.logging.client.file.id;
|
||||
if (mVersion.logging != null) {
|
||||
if (mVersion.logging.client.file.id.equals("client-1.12.xml")) {
|
||||
configPath = Tools.DIR_BUNDLE + "/log4j-rce-patch-1.12.xml";
|
||||
} else {
|
||||
configPath = Tools.DIR_GAME_NEW + "/" + mVersion.logging.client.file.id;
|
||||
}
|
||||
System.setProperty("log4j.configurationFile", configPath);
|
||||
}
|
||||
System.setProperty("log4j.configurationFile", configPath);
|
||||
Tools.launchMinecraft(AccountJNI.CURRENT_ACCOUNT, mVersion);
|
||||
} catch (Throwable th) {
|
||||
Tools.showError(th);
|
||||
|
||||
@@ -187,8 +187,10 @@ public final class Tools
|
||||
varArgMap.put("auth_access_token", profile.accessToken);
|
||||
varArgMap.put("auth_player_name", username);
|
||||
varArgMap.put("auth_uuid", profile.profileId);
|
||||
// varArgMap.put("auth_xuid", profile.profileId); // TODO!!!
|
||||
varArgMap.put("assets_root", Tools.ASSETS_PATH);
|
||||
varArgMap.put("assets_index_name", versionInfo.assets);
|
||||
varArgMap.put("clientid", profile.clientToken);
|
||||
varArgMap.put("game_assets", Tools.ASSETS_PATH);
|
||||
varArgMap.put("game_directory", gameDir.getAbsolutePath());
|
||||
varArgMap.put("user_properties", "{}");
|
||||
@@ -476,7 +478,7 @@ public final class Tools
|
||||
DependentLibrary libAdded = libList.get(i);
|
||||
String libAddedName = libAdded.name.substring(0, libAdded.name.lastIndexOf(":"));
|
||||
|
||||
if (libAddedName.equals(libName)) {
|
||||
if (!libAdded.name.equals(lib.name) && libAddedName.equals(libName)) {
|
||||
System.out.println("Library " + libName + ": Replaced version " +
|
||||
libAdded.name.substring(libAddedName.length() + 1) + " with " +
|
||||
lib.name.substring(libName.length() + 1));
|
||||
|
||||
@@ -7,7 +7,7 @@ public class MinecraftAccount
|
||||
{
|
||||
public String accessToken = "0"; // access token
|
||||
public String clientToken = "0"; // clientID: refresh and invalidate
|
||||
public String profileId = "0"; // authenticate UUID
|
||||
public String profileId = "00000000-0000-0000-0000-000000000000"; // authenticate UUID
|
||||
public String username = "Steve";
|
||||
public String selectedVersion = "1.7.10";
|
||||
public boolean isMicrosoft = false;
|
||||
|
||||
Reference in new issue
Block a user