mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-19 01:27:18 -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) {
|
public static String[] getMinecraftArgs(MCProfile.Builder profile, JMinecraftVersionList.Version versionInfo) {
|
||||||
String username = profile.getUsername();
|
String username = profile.getUsername();
|
||||||
String versionName = profile.getVersion();
|
String versionName = versionInfo.id;
|
||||||
if (versionInfo.inheritsFrom != null) {
|
if (versionInfo.inheritsFrom != null) {
|
||||||
versionName = versionInfo.inheritsFrom;
|
versionName = versionInfo.inheritsFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
String userType = "mojang";
|
String userType = "mojang";
|
||||||
|
|
||||||
File gameDir = new File(Tools.MAIN_PATH);
|
File gameDir = new File(Tools.MAIN_PATH);
|
||||||
@ -528,11 +529,11 @@ public final class Tools
|
|||||||
customVer.optifineLib = lib;
|
customVer.optifineLib = lib;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (customVer.inheritsFrom == null || customVer.inheritsFrom.isEmpty()) {
|
if (customVer.inheritsFrom == null || customVer.inheritsFrom.equals(customVer.id)) {
|
||||||
return customVer;
|
return customVer;
|
||||||
} else {
|
} else {
|
||||||
JMinecraftVersionList.Version inheritsVer = Tools.GLOBAL_GSON.fromJson(read(versnDir + "/" + customVer.inheritsFrom + "/" + customVer.inheritsFrom + ".json"), JMinecraftVersionList.Version.class);
|
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,
|
insertSafety(inheritsVer, customVer,
|
||||||
"assetIndex", "assets", "id",
|
"assetIndex", "assets", "id",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user