This commit is contained in:
Pierce 2019-10-28 18:03:32 -04:00
parent 5619acb711
commit 06337a8914
4 changed files with 8 additions and 5 deletions

View file

@ -334,6 +334,7 @@ class Handler {
const downloadLink = `${url}${lib[0].replace(/\./g, '/')}/${lib[1]}/${lib[2]}/${name}`;
if(fs.existsSync(path.join(jarPath, name))) {
paths.push(`${jarPath}${path.sep}${name}`);
counter = counter + 1;
@ -343,7 +344,7 @@ class Handler {
if(!fs.existsSync(jarPath)) shelljs.mkdir('-p', jarPath);
const download = await this.downloadAsync(downloadLink, jarPath, name, true, 'forge');
if(!download) await this.downloadAsync(`https://search.maven.org/remotecontent?filepath=${lib[0].replace(/\./g, '/')}/${lib[1]}/${lib[2]}/${name}`, jarPath, name, true, 'forge');
if(!download) await this.downloadAsync(`${this.options.overrides.url.fallbackMaven}${lib[0].replace(/\./g, '/')}/${lib[1]}/${lib[2]}/${name}`, jarPath, name, true, 'forge');
paths.push(`${jarPath}${path.sep}${name}`);
counter = counter + 1;

View file

@ -20,7 +20,8 @@ class MCLCore extends EventEmitter {
meta: this.options.overrides.url.meta || "https://launchermeta.mojang.com",
resource: this.options.overrides.url.resource || "https://resources.download.minecraft.net",
mavenForge: this.options.overrides.url.mavenForge || "http://files.minecraftforge.net/maven/",
defaultRepoForge: this.options.overrides.url.defaultRepoForge || "https://libraries.minecraft.net/"
defaultRepoForge: this.options.overrides.url.defaultRepoForge || "https://libraries.minecraft.net/",
fallbackMaven: this.options.overrides.url.fallbackMaven || "https://search.maven.org/remotecontent?filepath="
};
this.handler = new handler(this);
// Lets the events register. our magic switch!