mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 06:17:47 -04:00
Fixed #82
This commit is contained in:
parent
f6bdb986dd
commit
2553ce82ec
@ -80,7 +80,7 @@ public class MojangDownloadProvider extends IDownloadProvider {
|
||||
return str.replace("http://files.minecraftforge.net/maven", "http://ftb.cursecdn.com/FTB2/maven/");
|
||||
else if (str.contains("typesafe") || str.contains("scala"))
|
||||
if (SupportedLocales.NOW_LOCALE.self == Locale.CHINA)
|
||||
return str.replace("http://files.minecraftforge.net/maven", "http://maven.oschina.net/content/groups/public");
|
||||
return str.replace("http://files.minecraftforge.net/maven", "http://ftb.cursecdn.com/FTB2/maven/");
|
||||
else
|
||||
return str.replace("http://files.minecraftforge.net/maven", "http://repo1.maven.org/maven2");
|
||||
else
|
||||
|
@ -70,6 +70,8 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
||||
}
|
||||
|
||||
private String getNative() {
|
||||
if (natives == null)
|
||||
return "";
|
||||
switch (OS.os()) {
|
||||
case WINDOWS:
|
||||
return formatArch(natives.windows);
|
||||
@ -86,6 +88,8 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
||||
}
|
||||
|
||||
public String formatName() {
|
||||
if (name == null)
|
||||
return null;
|
||||
String[] s = name.split(":");
|
||||
if (s.length < 3)
|
||||
return null;
|
||||
@ -110,6 +114,8 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
||||
|
||||
@Override
|
||||
public LibraryDownloadInfo getDownloadInfo() {
|
||||
if (name == null)
|
||||
return null;
|
||||
if (downloads == null)
|
||||
downloads = new LibrariesDownloadInfo();
|
||||
LibraryDownloadInfo info;
|
||||
@ -120,7 +126,8 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
||||
downloads.classifiers.put(getNative(), info = new LibraryDownloadInfo());
|
||||
else {
|
||||
info = downloads.classifiers.get(getNative());
|
||||
if (info == null) info = new LibraryDownloadInfo();
|
||||
if (info == null)
|
||||
info = new LibraryDownloadInfo();
|
||||
}
|
||||
} else {
|
||||
if (downloads.artifact == null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user