mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 14:26:43 -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/");
|
return str.replace("http://files.minecraftforge.net/maven", "http://ftb.cursecdn.com/FTB2/maven/");
|
||||||
else if (str.contains("typesafe") || str.contains("scala"))
|
else if (str.contains("typesafe") || str.contains("scala"))
|
||||||
if (SupportedLocales.NOW_LOCALE.self == Locale.CHINA)
|
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
|
else
|
||||||
return str.replace("http://files.minecraftforge.net/maven", "http://repo1.maven.org/maven2");
|
return str.replace("http://files.minecraftforge.net/maven", "http://repo1.maven.org/maven2");
|
||||||
else
|
else
|
||||||
|
@ -70,6 +70,8 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getNative() {
|
private String getNative() {
|
||||||
|
if (natives == null)
|
||||||
|
return "";
|
||||||
switch (OS.os()) {
|
switch (OS.os()) {
|
||||||
case WINDOWS:
|
case WINDOWS:
|
||||||
return formatArch(natives.windows);
|
return formatArch(natives.windows);
|
||||||
@ -86,6 +88,8 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String formatName() {
|
public String formatName() {
|
||||||
|
if (name == null)
|
||||||
|
return null;
|
||||||
String[] s = name.split(":");
|
String[] s = name.split(":");
|
||||||
if (s.length < 3)
|
if (s.length < 3)
|
||||||
return null;
|
return null;
|
||||||
@ -110,6 +114,8 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LibraryDownloadInfo getDownloadInfo() {
|
public LibraryDownloadInfo getDownloadInfo() {
|
||||||
|
if (name == null)
|
||||||
|
return null;
|
||||||
if (downloads == null)
|
if (downloads == null)
|
||||||
downloads = new LibrariesDownloadInfo();
|
downloads = new LibrariesDownloadInfo();
|
||||||
LibraryDownloadInfo info;
|
LibraryDownloadInfo info;
|
||||||
@ -120,7 +126,8 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
|||||||
downloads.classifiers.put(getNative(), info = new LibraryDownloadInfo());
|
downloads.classifiers.put(getNative(), info = new LibraryDownloadInfo());
|
||||||
else {
|
else {
|
||||||
info = downloads.classifiers.get(getNative());
|
info = downloads.classifiers.get(getNative());
|
||||||
if (info == null) info = new LibraryDownloadInfo();
|
if (info == null)
|
||||||
|
info = new LibraryDownloadInfo();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (downloads.artifact == null)
|
if (downloads.artifact == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user