feat:基本最终完成
This commit is contained in:
@@ -27,6 +27,7 @@ export default async function install(
|
||||
.get(`version/${minecraftversion}/json`)
|
||||
.json()) as mcinfoX; //获取Minecraft版本JSON
|
||||
const forgepath = path;
|
||||
console.log(loaderversion)
|
||||
const forgedata = (
|
||||
await gotx.get(
|
||||
`forge/download?mcversion=${minecraftversion}&version=${loaderversion}&category=installer&format=jar`
|
||||
@@ -49,7 +50,7 @@ export default async function install(
|
||||
//下载依赖1
|
||||
const t = fvdata[c].downloads.artifact;
|
||||
await xfastdownload(
|
||||
`maven${new URL(t.url).pathname}`,
|
||||
`https://bmclapi2.bangbang93.com/maven${new URL(t.url).pathname}`,
|
||||
`${forgepath}/libraries/${t.path}`,
|
||||
16
|
||||
);
|
||||
@@ -61,7 +62,7 @@ export default async function install(
|
||||
//下载依赖2
|
||||
const t = fvdata[c].downloads.artifact;
|
||||
await xfastdownload(
|
||||
`maven${new URL(t.url).pathname}`,
|
||||
`https://bmclapi2.bangbang93.com/maven${new URL(t.url).pathname}`,
|
||||
`${forgepath}/libraries/${t.path}`,
|
||||
16
|
||||
);
|
||||
@@ -69,7 +70,7 @@ export default async function install(
|
||||
//下载MAPPING与MOJMAPS
|
||||
/*MOJMAPS*/
|
||||
await xfastdownload(
|
||||
new URL(mcinfo.downloads.server_mappings.url).pathname,
|
||||
`https://bmclapi2.bangbang93.com${new URL(mcinfo.downloads.server_mappings.url).pathname}`,
|
||||
`${forgepath}/libraries/${mavenToUrl(
|
||||
json.data.MOJMAPS.server.replace(/[[\]]/g, ""),
|
||||
""
|
||||
@@ -83,7 +84,7 @@ export default async function install(
|
||||
/['"]/g,
|
||||
""
|
||||
)}.zip`;
|
||||
await xfastdownload(`maven/${tmp}`, `${forgepath}/libraries/${tmp}`);
|
||||
await xfastdownload(`https://bmclapi2.bangbang93.com/maven/${tmp}`, `${forgepath}/libraries/${tmp}`);
|
||||
LOGGER.info("下载MAPPING与MOJMAPS完成!");
|
||||
}
|
||||
}
|
||||
@@ -91,14 +92,14 @@ export default async function install(
|
||||
for (let d = 0; d < mcinfo.libraries.length; d++) {
|
||||
const g = mcinfo.libraries[d].downloads.artifact;
|
||||
await xfastdownload(
|
||||
`maven${new URL(g.url).pathname}`,
|
||||
`https://bmclapi2.bangbang93.com/maven${new URL(g.url).pathname}`,
|
||||
`${forgepath}/libraries/${g.path}`,
|
||||
16
|
||||
);
|
||||
}
|
||||
LOGGER.info(`下载Minecraft的Maven完成!`);
|
||||
await xfastdownload(
|
||||
`version/${minecraftversion}/server`,
|
||||
`https://bmclapi2.bangbang93.com/version/${minecraftversion}/server`,
|
||||
`${forgepath}/libraries/net/minecraft/server/${minecraftversion}/server-${minecraftversion}.jar`,
|
||||
1
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user