fix:neoforge无法使用

This commit is contained in:
Tianpao
2025-07-09 20:44:54 +08:00
parent 2f518e4487
commit 0acd64ae86

View File

@@ -19,7 +19,7 @@ export default async function install(
neoforge: string,
path: string
) {
const mcinfo = (await gotx
const mcinfo = (await got
.get(`version/${minecraft}/json`)
.json()) as mcinfoX; //获取Minecraft版本JSON
const installer = (
@@ -35,7 +35,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}`,
`${path}/libraries/${t.path}`,
16
);
@@ -47,7 +47,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}`,
`${path}/libraries/${t.path}`,
16
);
@@ -57,13 +57,13 @@ 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}`,
`${path}/libraries/${g.path}`,
16
);
}
await xfastdownload(
`version/${minecraft}/server`,
`https://bmclapi2.bangbang93.com/version/${minecraft}/server`,
`${path}/libraries/net/minecraft/server/${minecraft}/server-${minecraft}.jar`,
1
);