Skip to content

Commit 14761d9

Browse files
committed
fix[MinecraftDownloader]: Better handling in local profile while online
This used to throw the exception at https://github.com/AngelAuraMC/Amethyst-Android/blob/dcdcdff363090ecb2169425269447977cedd2fc3/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java#L898-L899O Which resulted in a confusing error box. This just triggers that but earlier so we catch it and provide a nicer error box.
1 parent 66db228 commit 14761d9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/tasks/MinecraftDownloader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public void start(@Nullable Activity activity, @Nullable JMinecraftVersionList.V
102102
// Ensure they're both not some 0 byte corrupted json
103103
if (providedJsonFile.length() == 0 || vanillaJsonFile.exists() && vanillaJsonFile.length() == 0){
104104
throw new RuntimeException("Minecraft "+versionMessage+ " is needed by " +realVersion); }
105-
105+
// Ensure that the inherited version in fact exists
106+
getVersionInfo(versionMessage); // This throws an exception if the .json is missing, which we catch for the error message
106107
listener.onDownloadDone();
107108
} catch (Exception e) {
108109
String tryagain = !isOnline ? "Please ensure you have an internet connection" : "Please try again on your Microsoft Account";

0 commit comments

Comments
 (0)