mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
Fix: handle latest-release/snapshot version id
This commit is contained in:
parent
37408f03dc
commit
cc142fff20
@ -334,7 +334,7 @@ public class MainActivity extends BaseActivity {
|
||||
JREUtils.redirectAndPrintJRELog();
|
||||
|
||||
LauncherProfiles.update();
|
||||
Tools.launchMinecraft(this, mProfile, minecraftProfile);
|
||||
Tools.launchMinecraft(this, mProfile, minecraftProfile, mVersionInfo);
|
||||
}
|
||||
|
||||
private void checkJavaArgsIsLaunchable(String jreVersion) throws Throwable {
|
||||
|
@ -110,7 +110,8 @@ public final class Tools {
|
||||
}
|
||||
|
||||
|
||||
public static void launchMinecraft(final Activity activity, MinecraftAccount minecraftAccount, MinecraftProfile minecraftProfile) throws Throwable {
|
||||
public static void launchMinecraft(final Activity activity, MinecraftAccount minecraftAccount,
|
||||
MinecraftProfile minecraftProfile, JMinecraftVersionList.Version versionInfo) throws Throwable {
|
||||
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
|
||||
((ActivityManager)activity.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(mi);
|
||||
if(LauncherPreferences.PREF_RAM_ALLOCATION > (mi.availMem/1048576L)) {
|
||||
@ -127,8 +128,6 @@ public final class Tools {
|
||||
}
|
||||
}
|
||||
|
||||
JMinecraftVersionList.Version versionInfo = Tools.getVersionInfo(minecraftProfile.lastVersionId);
|
||||
|
||||
LauncherProfiles.update();
|
||||
String gamedirPath = Tools.getGameDirPath(minecraftProfile);
|
||||
|
||||
@ -143,7 +142,7 @@ public final class Tools {
|
||||
OldVersionsUtils.selectOpenGlVersion(versionInfo);
|
||||
|
||||
|
||||
String launchClassPath = generateLaunchClassPath(versionInfo, minecraftProfile.lastVersionId);
|
||||
String launchClassPath = generateLaunchClassPath(versionInfo, versionInfo.id);
|
||||
|
||||
List<String> javaArgList = new ArrayList<String>();
|
||||
|
||||
@ -169,7 +168,7 @@ public final class Tools {
|
||||
}
|
||||
javaArgList.add("-Dlog4j.configurationFile=" + configFile);
|
||||
}
|
||||
javaArgList.addAll(Arrays.asList(getMinecraftJVMArgs(minecraftProfile.lastVersionId, gamedirPath)));
|
||||
javaArgList.addAll(Arrays.asList(getMinecraftJVMArgs(versionInfo.id, gamedirPath)));
|
||||
javaArgList.add("-cp");
|
||||
javaArgList.add(getLWJGL3ClassPath() + ":" + launchClassPath);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user