hfmc-dev/old_manifest

174 lines
5.4 KiB
Plaintext

const vars = {
id: "hfmc-dev",
version: "1.0.0",
icon: "https://git.ragestudio.net/srgooglo/hfmc-dev/raw/branch/main/icon.png",
name: "Hispano Furs MC (DEV)",
description: "Minecraft Modpack",
author: "HispanoFurs"
}
const internalVars = {
public_ip: "0.0.0.0",
public_ip_port: "25565",
git_source: "https://git.ragestudio.net/srgooglo/hfmc-dev",
auth: {
login: "https://hispanofurs.comty.app/auth",
fetcher: "https://hispanofurs.comty.app/rsauthorize",
getter: "https://hispanofurs_api.comty.app/data",
},
mc_version: {
forge: "1.20.1-forge-47.2.17",
number: "1.20.1",
type: "release",
}
}
const defaultConfig = {
assigned_memory: 4096,
}
const fs = require("node:fs")
module.exports = {
...vars,
rsb_minimun_version: "0.15.0",
import_libs: [
"mcl",
"ipc",
"auth",
],
patches: [
{
id: "3d_skins_layers",
name: "3D Skins Layers",
additions: [
{
file: `%install_path%/mods/skinlayers3d-forge-1.6.2-mc1.20.1.jar`,
steps: {
http_downloads: [
{
url: "https://cdn.modrinth.com/data/zV5r3pPn/versions/z7pEP8p7/skinlayers3d-forge-1.6.2-mc1.20.1.jar",
path: `%install_path%/mods/skinlayers3d-forge-1.6.2-mc1.20.1.jar`,
}
]
}
}
]
},
{
id: "complementary_shader",
name: "Complementary Shader",
additions: [
{
file: `%install_path%/shaderpacks/ComplementaryReimagined_r5.1.1.zip`,
steps: {
http_downloads: [
{
url: "https://cdn.modrinth.com/data/HVnmMxH1/versions/D5fox3fg/ComplementaryReimagined_r5.1.1.zip",
path: `%install_path%/shaderpacks/ComplementaryReimagined_r5.1.1.zip`,
}
]
}
}
]
},
{
id: "plasmo_voice",
name: "Plasmo Voice (Voice Chat)",
additions: [
{
file: `%install_path%/mods/plasmovoice-forge-1.20.1-2.0.8.jar`,
steps: {
http_downloads: [
{
url: "https://cdn.modrinth.com/data/1bZhdhsH/versions/piuPs5b0/plasmovoice-forge-1.20.1-2.0.8.jar",
path: `%install_path%/mods/plasmovoice-forge-1.20.1-2.0.8.jar`,
}
]
}
}
],
default: true,
}
],
auth: internalVars.auth,
configs: {
assigned_memory: {
label: "Assigned Memory",
type: "number",
default: defaultConfig.assigned_memory,
icon: "MdMemory",
ui_component: "slider",
ui_component_props: {
min: 2048,
max: 8192,
step: 1024,
unit: "MB"
},
},
},
install_steps: {
git_clones: [
{
path: ".",
url: internalVars.git_source
},
],
},
update_steps: {
git_reset: [
{
path: ".",
from: "HEAD",
},
],
},
executable: true,
check_updates_after_execute: true,
after_install: async (pkg) => {
// patch options.txt from default_options.txt
const defaultOptionsPath = `${pkg.install_path}/default_options.txt`
const finalOptionsPath = `${pkg.install_path}/options.txt`
fs.copyFileSync(defaultOptionsPath, finalOptionsPath)
},
execute: async (pkg) => {
let storagedAuth = await pkg.libraries.auth.get()
if (!storagedAuth) {
return pkg.libraries.auth.request()
}
const auth = await pkg.libraries.mcl.auth(storagedAuth.assigned_username)
return pkg.libraries.mcl.launch(
{
javaPath: global.JAVA_PATH,
root: pkg.install_path,
authorization: auth,
version: internalVars.mc_version,
memory: {
max: pkg.storaged_configs?.assigned_memory ?? defaultConfig.assigned_memory,
min: 2048
},
forge: `${pkg.install_path}/forge-installer.jar`,
},
{
install: () => {
pkg.libraries.ipc.send(`new:notification`, {
message: "Downloading assets",
description: "This may take a while...",
loading: true,
duration: 10
})
},
init_assets: () => {
pkg.libraries.ipc.send(`new:message`, {
message: "Preparing assets, please wait...",
type: "loading",
duration: 10000,
})
}
})
}
}