This commit is contained in:
huangyuhui 2017-02-09 13:10:30 +08:00
parent f6bdb986dd
commit 2553ce82ec
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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)