This commit is contained in:
Joey Eamigh
2023-06-21 23:17:17 -04:00
parent 9bea47ca50
commit e3ae3fe83d
4 changed files with 112 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ def __main__():
forge()
launch()
# launcher
def launch():
if input("launch server? [Y/n] ").lower() == "n":
@@ -33,6 +34,7 @@ def launch():
os.chdir(f"{INSTANCE_DIR}/.minecraft")
subprocess.run(["java", "-Xmx30720M", "-Xms1024M", "-jar", FORGE_JAR, "--nogui"])
# forge
def forge():
os.makedirs(f"{INSTANCE_DIR}/.minecraft", exist_ok=True)
@@ -71,6 +73,8 @@ 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":
continue
os.remove(file)
for file in glob.glob(os.path.join(INSTANCE_DIR, "mods", "mods", "*")):