mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-11 13:45:48 -04:00
fix[Login]: Fix offline profile launching modded instances
Addresses https://github.com/PojavLauncherTeam/PojavLauncher/issues/6829
This commit is contained in:
parent
f6284f4ab0
commit
e4d070f9ef
@ -27,6 +27,7 @@ import net.kdt.pojavlaunch.value.MinecraftLibraryArtifact;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@ -76,8 +77,14 @@ public class MinecraftDownloader {
|
||||
|
||||
sExecutorService.execute(() -> {
|
||||
try {
|
||||
if(isLocalProfile){
|
||||
throw new RuntimeException("Download failed. Please make sure you are logged in with a Microsoft Account.");
|
||||
}
|
||||
downloadGame(activity, version, realVersion);
|
||||
listener.onDownloadDone();
|
||||
}catch (UnknownHostException e){
|
||||
Log.i("DownloadMirror", e.toString());
|
||||
Tools.showErrorRemote("Can't download Minecraft, no internet connection found", e);
|
||||
}catch (Exception e) {
|
||||
listener.onDownloadFailed(e);
|
||||
}
|
||||
@ -516,10 +523,6 @@ public class MinecraftDownloader {
|
||||
}
|
||||
|
||||
private void downloadFile() throws Exception {
|
||||
if(isLocalProfile){
|
||||
throw new RuntimeException("Download failed. Please make sure you are logged in with a Microsoft Account.");
|
||||
}
|
||||
|
||||
try {
|
||||
DownloadUtils.ensureSha1(mTargetPath, mTargetSha1, () -> {
|
||||
DownloadMirror.downloadFileMirrored(mDownloadClass, mTargetUrl, mTargetPath,
|
||||
|
Loading…
x
Reference in New Issue
Block a user