Compare commits
6 Commits
v0.3.0
...
5ae6a336c1
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ae6a336c1 | |||
| 81824cf44f | |||
| 8ec387f4e3 | |||
| 23ed3e5d97 | |||
| 560217cd38 | |||
| 519e2c8f6d |
+48
-1
@@ -3,7 +3,7 @@
|
|||||||
"version": "1.16.5",
|
"version": "1.16.5",
|
||||||
"modLoaders": [
|
"modLoaders": [
|
||||||
{
|
{
|
||||||
"id": "forge-36.2.34",
|
"id": "forge-36.2.39",
|
||||||
"primary": true
|
"primary": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -142,6 +142,26 @@
|
|||||||
"name": "Simple Storage Network"
|
"name": "Simple Storage Network"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"projectID": 309927,
|
||||||
|
"fileID": 4419403,
|
||||||
|
"required": true,
|
||||||
|
"__meta": {
|
||||||
|
"name": "Curios API (Forge)",
|
||||||
|
"explicit": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"projectID": 313536,
|
||||||
|
"fileID": 3431126,
|
||||||
|
"required": true,
|
||||||
|
"__meta": {
|
||||||
|
"name": "BountifulBaubles",
|
||||||
|
"dependencies": [
|
||||||
|
309927
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"projectID": 328085,
|
"projectID": 328085,
|
||||||
"fileID": 3536025,
|
"fileID": 3536025,
|
||||||
@@ -249,6 +269,14 @@
|
|||||||
"explicit": false
|
"explicit": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"projectID": 422301,
|
||||||
|
"fileID": 4167327,
|
||||||
|
"required": true,
|
||||||
|
"__meta": {
|
||||||
|
"name": "Sophisticated Backpacks"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"projectID": 439870,
|
"projectID": 439870,
|
||||||
"fileID": 4576329,
|
"fileID": 4576329,
|
||||||
@@ -295,6 +323,17 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"projectID": 545905,
|
||||||
|
"fileID": 4584293,
|
||||||
|
"required": true,
|
||||||
|
"__meta": {
|
||||||
|
"name": "EnvySTS",
|
||||||
|
"dependencies": [
|
||||||
|
389487
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"projectID": 818696,
|
"projectID": 818696,
|
||||||
"fileID": 4369234,
|
"fileID": 4369234,
|
||||||
@@ -302,6 +341,14 @@
|
|||||||
"__meta": {
|
"__meta": {
|
||||||
"name": "PokeFactory Compatibility"
|
"name": "PokeFactory Compatibility"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"projectID": 861884,
|
||||||
|
"fileID": 4559794,
|
||||||
|
"required": true,
|
||||||
|
"__meta": {
|
||||||
|
"name": "Universal Pokeloot"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -29,9 +29,9 @@
|
|||||||
"uid": "net.minecraft"
|
"uid": "net.minecraft"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"cachedVersion": "36.2.34",
|
"cachedVersion": "36.2.39",
|
||||||
"uid": "net.minecraftforge",
|
"uid": "net.minecraftforge",
|
||||||
"version": "36.2.34"
|
"version": "36.2.39"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"formatVersion": 1
|
"formatVersion": 1
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+42
-28
@@ -1,33 +1,37 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os, sys, shutil, requests, tempfile, glob, subprocess
|
import os, sys, shutil, requests, tempfile, glob, subprocess, argparse
|
||||||
from termcolor import cprint
|
from termcolor import cprint
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description="server script for FishPogPixelmon")
|
||||||
|
parser.add_argument("--plugins", "-p", help="refreshes plugins", action="store_true")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
OS = sys.platform
|
OS = sys.platform
|
||||||
|
|
||||||
|
SERVER_DIR = os.getcwd()
|
||||||
|
|
||||||
MOD_DOWNLOADER_URL = "https://github.com/Joshyx/ModpackDownloader/releases/download/v1.3/ModpackDownloader-1.3.jar"
|
MOD_DOWNLOADER_URL = "https://github.com/Joshyx/ModpackDownloader/releases/download/v1.3/ModpackDownloader-1.3.jar"
|
||||||
FORGE_URL = (
|
|
||||||
"https://maven.minecraftforge.net/net/minecraftforge/forge/1.16.5-36.2.34/forge-1.16.5-36.2.34-installer.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_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"
|
ARCLIGHT_JAR = "arclight.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"]
|
DELETION_EXEMPTED_MODS = ["TrainerCommands-1.16.5-2.6.0.jar"]
|
||||||
|
|
||||||
|
|
||||||
# main
|
# main
|
||||||
def __main__():
|
def __main__():
|
||||||
header()
|
header()
|
||||||
needs_mods = instance()
|
needs_mods_plugins = instance()
|
||||||
if needs_mods:
|
if needs_mods_plugins:
|
||||||
mods()
|
mods()
|
||||||
forge()
|
if args.plugins:
|
||||||
|
plugins()
|
||||||
arclight()
|
arclight()
|
||||||
launch()
|
launch()
|
||||||
|
|
||||||
@@ -38,7 +42,17 @@ def launch():
|
|||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
os.chdir(f"{INSTANCE_DIR}/.minecraft")
|
os.chdir(f"{INSTANCE_DIR}/.minecraft")
|
||||||
subprocess.run(["java", "-Xmx30720M", "-Xms1024M", "-jar", ARCLIGHT_JAR, "--nogui"])
|
subprocess.run(
|
||||||
|
[
|
||||||
|
"java",
|
||||||
|
"--illegal-access=permit",
|
||||||
|
"-Xmx30720M",
|
||||||
|
"-Xms1024M",
|
||||||
|
"-jar",
|
||||||
|
ARCLIGHT_JAR,
|
||||||
|
"--nogui",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# arclight
|
# arclight
|
||||||
@@ -50,25 +64,9 @@ def arclight():
|
|||||||
return
|
return
|
||||||
|
|
||||||
cprint("arclight.jar not found - downloading", "yellow")
|
cprint("arclight.jar not found - downloading", "yellow")
|
||||||
r = requests.get(FORGE_URL, allow_redirects=True)
|
r = requests.get(ARCLIGHT_URL, allow_redirects=True)
|
||||||
open("arclight.jar", "wb").write(r.content)
|
open("arclight.jar", "wb").write(r.content)
|
||||||
|
|
||||||
|
|
||||||
# forge
|
|
||||||
def forge():
|
|
||||||
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", "forge-installer.jar")):
|
|
||||||
return
|
|
||||||
|
|
||||||
cprint("forge-installer.jar not found - downloading", "yellow")
|
|
||||||
r = requests.get(FORGE_URL, allow_redirects=True)
|
|
||||||
open("forge-installer.jar", "wb").write(r.content)
|
|
||||||
cprint("installing forge", "green")
|
|
||||||
|
|
||||||
subprocess.run(["java", "-jar", "forge-installer.jar", "--installServer"])
|
|
||||||
|
|
||||||
f = open("eula.txt", "w")
|
f = open("eula.txt", "w")
|
||||||
f.write("eula=true")
|
f.write("eula=true")
|
||||||
f.close()
|
f.close()
|
||||||
@@ -104,6 +102,22 @@ def mods():
|
|||||||
cprint("mods downloaded successfully", "green")
|
cprint("mods downloaded successfully", "green")
|
||||||
|
|
||||||
|
|
||||||
|
# plugins
|
||||||
|
def plugins():
|
||||||
|
os.chdir(INSTANCE_DIR)
|
||||||
|
|
||||||
|
os.makedirs(os.path.join(INSTANCE_DIR, ".minecraft", "plugins"), exist_ok=True)
|
||||||
|
|
||||||
|
for file in glob.glob(os.path.join(INSTANCE_DIR, ".minecraft", "plugins", "*")):
|
||||||
|
if file.endswith(".jar"):
|
||||||
|
os.remove(file)
|
||||||
|
|
||||||
|
for file in glob.glob(os.path.join(SERVER_DIR, "plugins", "*")):
|
||||||
|
shutil.copy(file, os.path.join(INSTANCE_DIR, ".minecraft", "plugins", os.path.basename(file)))
|
||||||
|
|
||||||
|
cprint("plugins copied successfully", "green")
|
||||||
|
|
||||||
|
|
||||||
# multimc
|
# multimc
|
||||||
def instance():
|
def instance():
|
||||||
unclean = False
|
unclean = False
|
||||||
|
|||||||
+1
-1
@@ -19,4 +19,4 @@ source .venv/bin/activate &>/dev/null
|
|||||||
python -m pip install --upgrade pip &>/dev/null
|
python -m pip install --upgrade pip &>/dev/null
|
||||||
python -m pip install -r ../client/requirements.txt &>/dev/null
|
python -m pip install -r ../client/requirements.txt &>/dev/null
|
||||||
|
|
||||||
python ./server.py
|
python ./server.py $1
|
||||||
|
|||||||
Reference in New Issue
Block a user