mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 16:16:04 -04:00
Copy from MCLauncherActivity.java
This commit is contained in:
parent
d51f4b2ce6
commit
4d73882708
@ -588,10 +588,19 @@ public class PojavLauncherActivity extends AppCompatActivity
|
|||||||
publishProgress("1", getString(R.string.mcl_launch_download_client, p1[0]));
|
publishProgress("1", getString(R.string.mcl_launch_download_client, p1[0]));
|
||||||
File minecraftMainFile = new File(minecraftMainJar);
|
File minecraftMainFile = new File(minecraftMainJar);
|
||||||
if (!minecraftMainFile.exists() || minecraftMainFile.length() == 0l) {
|
if (!minecraftMainFile.exists() || minecraftMainFile.length() == 0l) {
|
||||||
Tools.downloadFile(
|
try {
|
||||||
verInfo.downloads.values().toArray(new MinecraftClientInfo[0])[0].url,
|
Tools.downloadFile(
|
||||||
minecraftMainJar
|
verInfo.downloads.values().toArray(new MinecraftClientInfo[0])[0].url,
|
||||||
);
|
minecraftMainJar
|
||||||
|
);
|
||||||
|
} catch (Throwable th) {
|
||||||
|
if (verInfo.inheritsFrom != null) {
|
||||||
|
minecraftMainFile.delete();
|
||||||
|
IOUtils.copy(new FileInputStream(new File(Tools.versnDir, verInfo.inheritsFrom + "/" + verInfo.inheritsFrom + ".jar")), new FileOutputStream(minecraftMainFile));
|
||||||
|
} else {
|
||||||
|
throw th;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
launchWithError = true;
|
launchWithError = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user