This commit is contained in:
SrGooglo 2024-01-25 21:13:36 +01:00
parent af97c09aea
commit aa11425fb5
1 changed files with 11 additions and 10 deletions

View File

@ -66,24 +66,25 @@ module.exports = {
]
},
executable: true,
execute: async (manifest) => {
console.log(manifest)
check_updates_after_execute: true,
execute: async (pkg) => {
console.log(pkg)
const auth = await manifest.libraries.mcl.auth((manifest.storaged_configs?.username ?? defaultConfig.username))
const auth = await pkg.libraries.mcl.auth((pkg.storaged_configs?.username ?? defaultConfig.username))
return manifest.libraries.mcl.launch(
return pkg.libraries.mcl.launch(
{
root: manifest.install_path,
root: pkg.install_path,
authorization: auth,
version: {
number: internalVars.mc_version.number,
type: internalVars.mc_version.type
},
memory: {
max: manifest.storaged_configs?.assigned_memory ?? defaultConfig.assigned_memory,
max: pkg.storaged_configs?.assigned_memory ?? defaultConfig.assigned_memory,
min: 2048
},
forge: `${manifest.install_path}/forge-installer.jar`,
forge: `${pkg.install_path}/forge-installer.jar`,
quickPlay: {
type: "multiplayer",
identifier: `${internalVars.public_ip}:${internalVars.public_ip_port}`,
@ -99,15 +100,15 @@ module.exports = {
},
{
install: () => {
manifest.libraries.ipc.send(`new:notification`, {
pkg.libraries.ipc.send(`new:notification`, {
message: "Downloading assets",
description: "This may take a while...",
loading: true,
duration: 30000
duration: 10
})
},
init_assets: () => {
manifest.libraries.ipc.send(`new:message`, {
pkg.libraries.ipc.send(`new:message`, {
message: "Preparing assets, please wait...",
type: "loading",
duration: 10000,