191 lines
6.0 KiB
Plaintext
191 lines
6.0 KiB
Plaintext
const vars = {
|
|
id: "hfmc-dev",
|
|
version: "1.0.0",
|
|
icon: "https://git.ragestudio.net/srgooglo/hispanofurs-mc/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/hispanofurs-mc",
|
|
auth: {
|
|
login: "https://hispanofurs.comty.app/auth",
|
|
fetcher: "https://hispanofurs.comty.app/rsauthorize",
|
|
getter: "https://hispanofurs_api.comty.app/data",
|
|
},
|
|
mc_version: {
|
|
number: "1.20.1",
|
|
forge: "47.2.17",
|
|
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-fabric-1.6.2-mc1.20.1.jar`,
|
|
steps: {
|
|
http_downloads: [
|
|
{
|
|
url: "https://cdn.modrinth.com/data/zV5r3pPn/versions/KHhjRppT/skinlayers3d-fabric-1.6.2-mc1.20.1.jar",
|
|
path: `%install_path%/mods/skinlayers3d-fabric-1.6.2-mc1.20.1.jar`,
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: "3d_first_person",
|
|
name: "3D First Person",
|
|
additions: [
|
|
{
|
|
file: `%install_path%/mods/firstperson-fabric-2.3.4-mc1.20.1.jar`,
|
|
steps: {
|
|
http_downloads: [
|
|
{
|
|
url: "https://cdn.modrinth.com/data/H5XMjpHi/versions/UtdDBPeE/firstperson-fabric-2.3.4-mc1.20.1.jar",
|
|
path: `%install_path%/mods/firstperson-fabric-2.3.4-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-fabric-1.20.1-2.0.8.jar`,
|
|
steps: {
|
|
http_downloads: [
|
|
{
|
|
url: "https://cdn.modrinth.com/data/1bZhdhsH/versions/WcH8MqNA/plasmovoice-fabric-1.20.1-2.0.8.jar",
|
|
path: `%install_path%/mods/plasmovoice-fabric-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
|
|
},
|
|
//customArgs: [`--remote_token=${storagedAuth.token}`],
|
|
},
|
|
{
|
|
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,
|
|
})
|
|
}
|
|
})
|
|
}
|
|
} |