141 lines
4.2 KiB
Plaintext
141 lines
4.2 KiB
Plaintext
class Manifest {
|
|
static useLib = ["fs", "auth", "mcl"]
|
|
|
|
static id = "comtymc"
|
|
static version = "0.1.2"
|
|
static pkg_name = "Comty MC"
|
|
static description = "A Minecraft modpack"
|
|
static icon = "https://git.ragestudio.net/srgooglo/comtymc/raw/branch/master/icon.jpg"
|
|
static license = "unlicensed"
|
|
static author = "SrGooglo"
|
|
static core_minimum_version = "0.17.0"
|
|
|
|
static remote_manifest = "https://git.ragestudio.net/srgooglo/comtymc/raw/branch/master/.rmanifest"
|
|
static git_remote = "https://git.ragestudio.net/srgooglo/comtymc"
|
|
|
|
static mc_version = {
|
|
forge: "1.20.1-forge-47.2.17",
|
|
number: "1.20.1",
|
|
type: "release",
|
|
}
|
|
|
|
static authService = {
|
|
login: "https://mc.comty.app/auth",
|
|
fetcher: "https://mc.comty.app/relic_auth",
|
|
getter: "https://mc.comty.app/api/data",
|
|
}
|
|
|
|
configuration = {
|
|
memory: {
|
|
min: 2048,
|
|
default: 2048,
|
|
label: "Assigned Memory",
|
|
type: "number",
|
|
icon: "MdMemory",
|
|
ui_component: "slider",
|
|
ui_component_props: {
|
|
min: 2048,
|
|
max: 8192,
|
|
step: 1024,
|
|
unit: "MB"
|
|
},
|
|
}
|
|
}
|
|
|
|
patches = [
|
|
{
|
|
id: "complementary_shader",
|
|
name: "Complementary Shader",
|
|
additions: [
|
|
{
|
|
file: `%install_path%/shaderpacks/ComplementaryReimagined_r5.1.1.zip`,
|
|
steps: [
|
|
{
|
|
type: "http_file",
|
|
url: "https://cdn.modrinth.com/data/HVnmMxH1/versions/D5fox3fg/ComplementaryReimagined_r5.1.1.zip",
|
|
path: `%install_path%/shaderpacks/ComplementaryReimagined_r5.1.1.zip`,
|
|
}
|
|
]
|
|
}
|
|
],
|
|
},
|
|
{
|
|
id: "3d_first_person",
|
|
name: "3D First Person",
|
|
additions: [
|
|
{
|
|
file: `%install_path%/mods/firstperson-forge-2.3.4-mc1.20.1.jar`,
|
|
steps: [
|
|
{
|
|
type: "http_file",
|
|
url: "https://cdn.modrinth.com/data/H5XMjpHi/versions/lAVzC1ft/firstperson-forge-2.3.4-mc1.20.1.jar",
|
|
path: `%install_path%/mods/firstperson-forge-2.3.4-mc1.20.1.jar`,
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: "plasmo_voice",
|
|
name: "Plasmo Voice (Voice Chat)",
|
|
additions: [
|
|
{
|
|
file: `%install_path%/mods/plasmovoice-forge-1.20.1-2.0.8.jar`,
|
|
steps: [
|
|
{
|
|
type: "http_file",
|
|
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`,
|
|
}
|
|
]
|
|
}
|
|
],
|
|
},
|
|
]
|
|
|
|
installSteps = [
|
|
{
|
|
type: "git_clone",
|
|
url: Manifest.git_remote,
|
|
}
|
|
]
|
|
|
|
updateSteps = [
|
|
{
|
|
type: "git_reset",
|
|
from: "HEAD",
|
|
}
|
|
]
|
|
|
|
async afterInstall() {
|
|
const defaultOptionsPath = `${install_path}/default_options.txt`
|
|
const finalOptionsPath = `${install_path}/options.txt`
|
|
|
|
Lib.fs.copyFileSync(defaultOptionsPath, finalOptionsPath)
|
|
}
|
|
|
|
async execute() {
|
|
let auth = await Lib.auth.get()
|
|
|
|
if (!auth) {
|
|
return await Lib.auth.request()
|
|
}
|
|
|
|
auth = await Lib.mcl.auth(auth.assigned_username)
|
|
|
|
return await Lib.mcl.launch(
|
|
{
|
|
javaPath: Vars.java17_jre_bin,
|
|
root: install_path,
|
|
authorization: auth,
|
|
memory: {
|
|
min: this.configuration.memory.min,
|
|
max: Config.get("memory"),
|
|
},
|
|
version: Manifest.mc_version,
|
|
forge: `${install_path}/forge-installer.jar`,
|
|
}
|
|
)
|
|
}
|
|
}
|