diff --git a/manifest b/manifest index 84c9725..da116bc 100644 --- a/manifest +++ b/manifest @@ -1,7 +1,7 @@ // This variables can be changed :) global._ = { pack_id: "mccom2023", - version: "1.3.0", + version: "1.3.2", author: "MCommunity", name: "MCommunity", description: "MCommunity official modpack.", @@ -26,7 +26,7 @@ async function readImageToB64(_path) { } function resolveMcPath() { - let minecraftGameFolder = null; + let minecraftGameFolder = null switch (os.type()) { case "Darwin": @@ -48,7 +48,7 @@ function resolveMcPath() { break default: - minecraftGameFolder = path.join(os.homedir(), ".minecraft"); + minecraftGameFolder = path.join(os.homedir(), ".minecraft") break } @@ -58,8 +58,6 @@ function resolveMcPath() { function resolveMinecraftLauncher(args, cwd) { let _path = null - console.log(os.type()) - switch (os.type()) { case "Windows_NT": { _path = path.resolve(cwd, "runwin.bat") @@ -127,9 +125,9 @@ module.exports = { }, after_install: async ({ manifest, pack_dir, tmp_dir }) => { - console.log(manifest) - if (global._.forgeVersion) { + console.log("Installing forge...") + await new Promise((resolve, reject) => { const process = child_process.execFile("java", ["-jar", `${pack_dir}/tmp/forge-installer.jar`, "-installClient"], { cwd: pack_dir, @@ -194,7 +192,7 @@ module.exports = { `, { encoding: 'utf8' }) } }, - uninstall: async ({ manifest, pack_dir, tmp_dir, spinner }) => { + uninstall: async ({ manifest, pack_dir, tmp_dir }) => { const minecraftGameFolder = resolveMcPath() const profilesFilePath = path.join(minecraftGameFolder, "launcher_profiles.json") @@ -209,10 +207,10 @@ module.exports = { fs.writeFileSync(profilesFilePath, JSON.stringify(launcherJSON, null, 2)) } }, - execute: async ({ manifest, pack_dir, tmp_dir, spinner }) => { + execute: async ({ manifest, pack_dir, tmp_dir }) => { const launcherBin = resolveMinecraftLauncher([`--workDir ${pack_dir}`], os.type() === "Windows_NT" ? pack_dir : undefined) - console.log(launcherBin) + console.log(`Launching at >`, launcherBin) if (!launcherBin) { throw new Error("Minecraft Launcher binary not found")