Update manifest
This commit is contained in:
parent
e8dc666159
commit
c549b34d6d
11
manifest
11
manifest
|
@ -13,7 +13,6 @@ global._ = {
|
|||
installForge: false,
|
||||
}
|
||||
|
||||
// Please do not edit this following code, for gods sake.
|
||||
const os = require("node:os")
|
||||
const path = require("node:path")
|
||||
const fs = require("node:fs")
|
||||
|
@ -149,6 +148,9 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
|
||||
const minecraftGameFolder = resolveMcPath()
|
||||
|
||||
const legacyLauncherProfiles = path.resolve(minecraftGameFolder, "launcher_profiles.json")
|
||||
const profilesFilePath = path.resolve(pack_dir, "launcher_profiles.json")
|
||||
|
||||
let profiles_json = {
|
||||
|
@ -169,7 +171,7 @@ module.exports = {
|
|||
profiles: {},
|
||||
}
|
||||
|
||||
profiles_json.profiles[manifest.id] = {
|
||||
const profileData = {
|
||||
name: manifest.pack_name,
|
||||
gameDir: pack_dir,
|
||||
created: "2023-00-00T00:00:00.002Z",
|
||||
|
@ -180,6 +182,10 @@ module.exports = {
|
|||
icon: await readImageToB64(`${pack_dir}/icon/mc.png`),
|
||||
}
|
||||
|
||||
legacyLauncherProfiles.profiles[manifest.id] = profileData
|
||||
|
||||
profiles_json.profiles[manifest.id] = profileData
|
||||
|
||||
fs.writeFileSync(profilesFilePath, JSON.stringify(profiles_json, null, 2))
|
||||
|
||||
if (os.type() === "Windows_NT") {
|
||||
|
@ -223,6 +229,5 @@ start MinecraftLauncher.exe --workDir "${pack_dir}"
|
|||
process.on("exit", resolve)
|
||||
process.on("error", reject)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue