mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-11 05:35:45 -04:00
fix(modpack): installs being broken when installing multiple versions
This commit is contained in:
parent
40e2eb8c21
commit
755b397f19
@ -21,7 +21,14 @@ public class ModpackInstaller {
|
||||
public static ModLoader installModpack(ModDetail modDetail, int selectedVersion, InstallFunction installFunction) throws IOException {
|
||||
String versionUrl = modDetail.versionUrls[selectedVersion];
|
||||
String versionHash = modDetail.versionHashes[selectedVersion];
|
||||
String modpackName = modDetail.title.toLowerCase(Locale.ROOT).trim().replace(" ", "_" );
|
||||
String modpackName = (modDetail.title.toLowerCase(Locale.ROOT) + " " + modDetail.versionNames[selectedVersion])
|
||||
.trim().replaceAll("[\\\\/:*?\"<>| \\t\\n]", "_" );
|
||||
if (versionHash != null) {
|
||||
modpackName += "_" + versionHash;
|
||||
}
|
||||
if (modpackName.length() > 255){
|
||||
modpackName = modpackName.substring(0,255);
|
||||
}
|
||||
|
||||
// Build a new minecraft instance, folder first
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user