mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 17:15:40 -04:00
Fix empty version
This commit is contained in:
parent
e50933fbe1
commit
cc47a72bc2
@ -159,10 +159,11 @@ public final class Tools
|
||||
|
||||
public static String[] getMinecraftArgs(MCProfile.Builder profile, JMinecraftVersionList.Version versionInfo) {
|
||||
String username = profile.getUsername();
|
||||
String versionName = profile.getVersion();
|
||||
String versionName = versionInfo.id;
|
||||
if (versionInfo.inheritsFrom != null) {
|
||||
versionName = versionInfo.inheritsFrom;
|
||||
}
|
||||
|
||||
String userType = "mojang";
|
||||
|
||||
File gameDir = new File(Tools.MAIN_PATH);
|
||||
@ -528,11 +529,11 @@ public final class Tools
|
||||
customVer.optifineLib = lib;
|
||||
}
|
||||
}
|
||||
if (customVer.inheritsFrom == null || customVer.inheritsFrom.isEmpty()) {
|
||||
if (customVer.inheritsFrom == null || customVer.inheritsFrom.equals(customVer.id)) {
|
||||
return customVer;
|
||||
} else {
|
||||
JMinecraftVersionList.Version inheritsVer = Tools.GLOBAL_GSON.fromJson(read(versnDir + "/" + customVer.inheritsFrom + "/" + customVer.inheritsFrom + ".json"), JMinecraftVersionList.Version.class);
|
||||
inheritsVer.inheritsFrom = "";
|
||||
inheritsVer.inheritsFrom = inheritsVer.id;
|
||||
|
||||
insertSafety(inheritsVer, customVer,
|
||||
"assetIndex", "assets", "id",
|
||||
|
Loading…
x
Reference in New Issue
Block a user