fix(download): no longer download fabric api list from bmclapi.

This commit is contained in:
huanghongxun
2021-09-30 19:35:47 +08:00
parent 973510a3df
commit 33aeb24dbe

View File

@@ -51,7 +51,7 @@ public class FabricAPIVersionList extends VersionList<FabricAPIRemoteVersion> {
return CompletableFuture.runAsync(wrap(() -> { return CompletableFuture.runAsync(wrap(() -> {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder(); DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(downloadProvider.injectURL("https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/maven-metadata.xml")); Document doc = builder.parse("https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/maven-metadata.xml");
Element r = doc.getDocumentElement(); Element r = doc.getDocumentElement();
NodeList versionElements = r.getElementsByTagName("version"); NodeList versionElements = r.getElementsByTagName("version");
for (int i = 0; i < versionElements.getLength(); i++) { for (int i = 0; i < versionElements.getLength(); i++) {