From f13458073ef6e8390700f08b9477703f7df4498f Mon Sep 17 00:00:00 2001 From: Joey Eamigh <55670930+JoeyEamigh@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:31:51 -0400 Subject: [PATCH] arclight and another client tweak --- client/client.py | 7 +++---- modpack/manifest.json | 43 ------------------------------------------- server/server.py | 23 +++++++++++++++++++++-- 3 files changed, 24 insertions(+), 49 deletions(-) diff --git a/client/client.py b/client/client.py index 03b2608..37636cd 100644 --- a/client/client.py +++ b/client/client.py @@ -10,6 +10,8 @@ MOD_DOWNLOADER_URL = "https://github.com/Joshyx/ModpackDownloader/releases/downl MODPACK_RELEASES_URL = "https://git.233hfd.com/api/v1/repos/joey/FishPogPixelmon/releases?limit=1" +DELETION_EXEMPTED_MODS = ["TrainerCommands-1.16.5-2.6.0.jar", "OptiFine_1.16.5_HD_U_G8.jar"] + MULTIMC_DOWNLOAD_URL_WINDOWS = "https://files.multimc.org/downloads/mmc-develop-win32.zip" MULTIMC_PARENT_DIR = "" MULTIMC_DIR = "" @@ -86,10 +88,7 @@ def mods(): ) for file in glob.glob(os.path.join(INSTANCE_DIR, ".minecraft", "mods", "*")): - if ( - os.path.basename(file) == "OptiFine_1.16.5_HD_U_G8.jar" - or os.path.basename(file) == "TrainerCommands-1.16.5-2.6.0.jar" - ): + if os.path.basename(file) in DELETION_EXEMPTED_MODS: continue os.remove(file) diff --git a/modpack/manifest.json b/modpack/manifest.json index f5c7f05..0f6b989 100644 --- a/modpack/manifest.json +++ b/modpack/manifest.json @@ -59,14 +59,6 @@ "name": "Storage Drawers" } }, - { - "projectID": 225608, - "fileID": 3172951, - "required": true, - "__meta": { - "name": "WorldEdit" - } - }, { "projectID": 228756, "fileID": 3543538, @@ -150,18 +142,6 @@ "name": "Simple Storage Network" } }, - { - "projectID": 314905, - "fileID": 3802698, - "required": true, - "__meta": { - "name": "FTB Ranks (Forge)", - "dependencies": [ - 404465, - 419699 - ] - } - }, { "projectID": 328085, "fileID": 3536025, @@ -251,18 +231,6 @@ ] } }, - { - "projectID": 404465, - "fileID": 3553840, - "required": true, - "__meta": { - "name": "FTB Library (Forge)", - "explicit": false, - "dependencies": [ - 419699 - ] - } - }, { "projectID": 410295, "fileID": 4514901, @@ -272,17 +240,6 @@ "explicit": false } }, - { - "projectID": 410811, - "fileID": 3510643, - "required": true, - "__meta": { - "name": "FTB Essentials (Forge)", - "dependencies": [ - 404465 - ] - } - }, { "projectID": 419699, "fileID": 4521290, diff --git a/server/server.py b/server/server.py index fd7631f..a2c9f8b 100644 --- a/server/server.py +++ b/server/server.py @@ -13,8 +13,13 @@ FORGE_URL = ( FORGE_JAR = "forge-1.16.5-36.2.34.jar" MODPACK_RELEASES_URL = "https://git.233hfd.com/api/v1/repos/joey/FishPogPixelmon/releases?limit=1" +ARCLIGHT_URL = "https://github.com/IzzelAliz/Arclight/releases/download/1.16%2F1.0.24/arclight-forge-1.16.5-1.0.24.jar" +ARCLIGHT_JAR = "arclight-forge-1.16.5-1.0.24.jar" + INSTANCE_DIR = os.path.join(str(os.getenv("HOME")), "pixelmon") +DELETION_EXEMPTED_MODS = ["TrainerCommands-1.16.5-2.6.0.jar", "spongeforge-1.16.5-36.2.5-8.1.0-RC1352-universal.jar"] + # main def __main__(): @@ -23,6 +28,7 @@ def __main__(): if needs_mods: mods() forge() + arclight() launch() @@ -32,7 +38,20 @@ def launch(): exit(0) os.chdir(f"{INSTANCE_DIR}/.minecraft") - subprocess.run(["java", "-Xmx30720M", "-Xms1024M", "-jar", FORGE_JAR, "--nogui"]) + subprocess.run(["java", "-Xmx30720M", "-Xms1024M", "-jar", ARCLIGHT_JAR, "--nogui"]) + + +# arclight +def arclight(): + os.makedirs(f"{INSTANCE_DIR}/.minecraft", exist_ok=True) + os.chdir(f"{INSTANCE_DIR}/.minecraft") + + if os.path.exists(os.path.join(f"{INSTANCE_DIR}/.minecraft", "arclight.jar")): + return + + cprint("arclight.jar not found - downloading", "yellow") + r = requests.get(FORGE_URL, allow_redirects=True) + open("arclight.jar", "wb").write(r.content) # forge @@ -73,7 +92,7 @@ def mods(): subprocess.run(["java", "-jar", "downloader.jar", ".", "mods"], env=my_env) for file in glob.glob(os.path.join(INSTANCE_DIR, ".minecraft", "mods", "*")): - if os.path.basename(file) == "TrainerCommands-1.16.5-2.6.0.jar": + if os.path.basename(file) in DELETION_EXEMPTED_MODS: continue os.remove(file)