arclight and another client tweak

This commit is contained in:
Joey Eamigh
2023-06-22 17:31:51 -04:00
parent 315746073d
commit f13458073e
3 changed files with 24 additions and 49 deletions

View File

@@ -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" 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_DOWNLOAD_URL_WINDOWS = "https://files.multimc.org/downloads/mmc-develop-win32.zip"
MULTIMC_PARENT_DIR = "" MULTIMC_PARENT_DIR = ""
MULTIMC_DIR = "" MULTIMC_DIR = ""
@@ -86,10 +88,7 @@ def mods():
) )
for file in glob.glob(os.path.join(INSTANCE_DIR, ".minecraft", "mods", "*")): for file in glob.glob(os.path.join(INSTANCE_DIR, ".minecraft", "mods", "*")):
if ( if os.path.basename(file) in DELETION_EXEMPTED_MODS:
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"
):
continue continue
os.remove(file) os.remove(file)

View File

@@ -59,14 +59,6 @@
"name": "Storage Drawers" "name": "Storage Drawers"
} }
}, },
{
"projectID": 225608,
"fileID": 3172951,
"required": true,
"__meta": {
"name": "WorldEdit"
}
},
{ {
"projectID": 228756, "projectID": 228756,
"fileID": 3543538, "fileID": 3543538,
@@ -150,18 +142,6 @@
"name": "Simple Storage Network" "name": "Simple Storage Network"
} }
}, },
{
"projectID": 314905,
"fileID": 3802698,
"required": true,
"__meta": {
"name": "FTB Ranks (Forge)",
"dependencies": [
404465,
419699
]
}
},
{ {
"projectID": 328085, "projectID": 328085,
"fileID": 3536025, "fileID": 3536025,
@@ -251,18 +231,6 @@
] ]
} }
}, },
{
"projectID": 404465,
"fileID": 3553840,
"required": true,
"__meta": {
"name": "FTB Library (Forge)",
"explicit": false,
"dependencies": [
419699
]
}
},
{ {
"projectID": 410295, "projectID": 410295,
"fileID": 4514901, "fileID": 4514901,
@@ -272,17 +240,6 @@
"explicit": false "explicit": false
} }
}, },
{
"projectID": 410811,
"fileID": 3510643,
"required": true,
"__meta": {
"name": "FTB Essentials (Forge)",
"dependencies": [
404465
]
}
},
{ {
"projectID": 419699, "projectID": 419699,
"fileID": 4521290, "fileID": 4521290,

View File

@@ -13,8 +13,13 @@ FORGE_URL = (
FORGE_JAR = "forge-1.16.5-36.2.34.jar" 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" 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") 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 # main
def __main__(): def __main__():
@@ -23,6 +28,7 @@ def __main__():
if needs_mods: if needs_mods:
mods() mods()
forge() forge()
arclight()
launch() launch()
@@ -32,7 +38,20 @@ def launch():
exit(0) exit(0)
os.chdir(f"{INSTANCE_DIR}/.minecraft") 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 # forge
@@ -73,7 +92,7 @@ def mods():
subprocess.run(["java", "-jar", "downloader.jar", ".", "mods"], env=my_env) subprocess.run(["java", "-jar", "downloader.jar", ".", "mods"], env=my_env)
for file in glob.glob(os.path.join(INSTANCE_DIR, ".minecraft", "mods", "*")): 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 continue
os.remove(file) os.remove(file)