fix: B1 patch worldportal no EntityLMixin (fixes sable mixin crash) + pterodactyl startup
All checks were successful
Build & Release Pack / build (push) Successful in 1m38s

- Patch worldportal-neoforge-0.0.10+1.21: remove EntityLMixin (priority 750
  @WrapOperation getRelativePortalPosition) which conflicts with sable
  EntityMixin @Overwrite (priority 1000). Keeps other 10 mixins
  (EntityMixin, PortalForcerLMixin, etc.) so Void Dimension portals still
  work. IPSable 0.5.0 only fixes Entity::collide, not this method, so
  worldportal must be patched directly. Patched jar at tools/patches/
  with sha512 efbf5fac... and pw.toml now points to
  https://git.mithraic.cloud/.../tools/patches/worldportal-...-patched.jar
  (side=server, both packs).

- Add tools/pterodactyl-start.sh: correct NeoForge 21.1.248 Pterodactyl
  startup for yolks:java_21 egg. Handles packwiz -s server, neoforge
  installer (--installServer generates user_jvm_args.txt + unix_args.txt +
  run.sh), injects {{SERVER_MEMORY}} into user_jvm_args.txt (replaces
  -Xmx), and exec bash run.sh nogui (correct order
  java @user_jvm_args.txt @unix_args.txt). Replaces broken
  Hytale/start.sh exec java @unix_args.txt (missing user_jvm_args,
  hardcoded -Xms128M, no nogui, no run.sh, wrong CWD).

- Also fixed Hytale/start.sh to delegate to new script.
This commit is contained in:
MiTHRAL 2026-08-24 00:07:32 -04:00
parent 1417dd9c73
commit a88a0c2421
8 changed files with 92 additions and 12 deletions

View file

@ -887,7 +887,7 @@ metafile = true
[[files]] [[files]]
file = "mods/worldportal.pw.toml" file = "mods/worldportal.pw.toml"
hash = "5a4ae7824648c6b90b67dd6d913b5516f8ea180f72ac83d6c810293bcb535f06" hash = "6c68bccb9ef922f1bd2f012b41fb278eeb4f37b0120407556865bedf7cd43fdb"
metafile = true metafile = true
[[files]] [[files]]

View file

@ -1,11 +1,11 @@
name = "World Portal" name = "World Portal (patched - no EntityLMixin, fixes sable mixin conflict)"
filename = "worldportal-neoforge-0.0.10+1.21.jar" filename = "worldportal-neoforge-0.0.10+1.21-patched.jar"
side = "server" side = "server"
[download] [download]
url = "https://cdn.modrinth.com/data/A2PZGios/versions/kitApnnw/worldportal-neoforge-0.0.10%2B1.21.jar" url = "https://git.mithraic.cloud/ad3laid3/SciCraft/raw/branch/main/tools/patches/worldportal-neoforge-0.0.10+1.21-patched.jar"
hash-format = "sha512" hash-format = "sha512"
hash = "81dc2d6b36b133095d5ccdd8e83314c5bb45d3cb8b2f3bf57502c6d952a60b573c40a4ac32a1c9e55bbc15af32f240bcd47ed07949ff472240e60a731199c732" hash = "efbf5fac6b4cb89383e4c9477fbada35387c17fdfea9f9e9a063cf6441c5aebd868eedb4114091105d542516e3736c1517242142fff5f9b341a9866ed6e2005e"
[update] [update]
[update.modrinth] [update.modrinth]

View file

@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
[index] [index]
file = "index.toml" file = "index.toml"
hash-format = "sha256" hash-format = "sha256"
hash = "531f24a0a4e835bddfe0cd96771c11532277119c7bb0aec049011cb1fea663ac" hash = "f854fe332229eab4108b858886c9773f021f831ce78b4d7c74193bc9ddb65d2c"
[versions] [versions]
minecraft = "1.21.1" minecraft = "1.21.1"

View file

@ -728,5 +728,5 @@ metafile = true
[[files]] [[files]]
file = "mods/worldportal.pw.toml" file = "mods/worldportal.pw.toml"
hash = "5a4ae7824648c6b90b67dd6d913b5516f8ea180f72ac83d6c810293bcb535f06" hash = "6c68bccb9ef922f1bd2f012b41fb278eeb4f37b0120407556865bedf7cd43fdb"
metafile = true metafile = true

View file

@ -1,11 +1,11 @@
name = "World Portal" name = "World Portal (patched - no EntityLMixin, fixes sable mixin conflict)"
filename = "worldportal-neoforge-0.0.10+1.21.jar" filename = "worldportal-neoforge-0.0.10+1.21-patched.jar"
side = "server" side = "server"
[download] [download]
url = "https://cdn.modrinth.com/data/A2PZGios/versions/kitApnnw/worldportal-neoforge-0.0.10%2B1.21.jar" url = "https://git.mithraic.cloud/ad3laid3/SciCraft/raw/branch/main/tools/patches/worldportal-neoforge-0.0.10+1.21-patched.jar"
hash-format = "sha512" hash-format = "sha512"
hash = "81dc2d6b36b133095d5ccdd8e83314c5bb45d3cb8b2f3bf57502c6d952a60b573c40a4ac32a1c9e55bbc15af32f240bcd47ed07949ff472240e60a731199c732" hash = "efbf5fac6b4cb89383e4c9477fbada35387c17fdfea9f9e9a063cf6441c5aebd868eedb4114091105d542516e3736c1517242142fff5f9b341a9866ed6e2005e"
[update] [update]
[update.modrinth] [update.modrinth]

View file

@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
[index] [index]
file = "index.toml" file = "index.toml"
hash-format = "sha256" hash-format = "sha256"
hash = "8085d282381af5af60852646a2ded387cc45db4d7f60054a0419f701d2f0aa15" hash = "458e176e4de0ac679ee808a312155a3376039ebb3b20f42c827270fd183e5f25"
[versions] [versions]
minecraft = "1.21.1" minecraft = "1.21.1"

80
tools/pterodactyl-start.sh Executable file
View file

@ -0,0 +1,80 @@
#!/bin/bash
# Pterodactyl NeoForge 21.1.248 startup for SciCraft
# Egg: ghcr.io/pterodactyl/yolks:java_21
# Startup Command in Panel: bash tools/pterodactyl-start.sh
# Or: bash run.sh (if you prefer the egg's default)
set -e
echo "======================================"
echo " SciCraft - Pterodactyl Bootstrap"
echo " NeoForge 21.1.248 | packwiz"
echo "======================================"
# 1. Install packwiz mods if pack.toml changed
if [ ! -f packwiz-installer-bootstrap.jar ]; then
echo "[Ptero] Downloading packwiz installer..."
curl -fsSL -o packwiz-installer-bootstrap.jar https://github.com/packwiz/packwiz-installer-bootstrap/releases/latest/download/packwiz-installer-bootstrap.jar
fi
echo "[Ptero] Syncing server pack..."
# Use local server_pack/pack.toml if present (Pterodactyl clones the repo), else fall back to git raw
if [ -f server_pack/pack.toml ]; then
java -jar packwiz-installer-bootstrap.jar -g -s server server_pack/pack.toml
elif [ -f pack.toml ]; then
java -jar packwiz-installer-bootstrap.jar -g -s server pack.toml
else
# Fallback to remote (for Hytale misplaced folder)
java -jar packwiz-installer-bootstrap.jar -g -s server https://git.mithraic.cloud/ad3laid3/SciCraft/raw/branch/main/server_pack/pack.toml
fi
# 2. Install NeoForge server if missing (generates user_jvm_args.txt, unix_args.txt, run.sh)
if [ ! -f libraries/net/neoforged/neoforge/21.1.248/unix_args.txt ]; then
echo "[Ptero] Installing NeoForge 21.1.248 server..."
if [ ! -f neoforge-21.1.248-installer.jar ]; then
curl -fsSL -o neoforge-21.1.248-installer.jar https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.248/neoforge-21.1.248-installer.jar
fi
java -jar neoforge-21.1.248-installer.jar --installServer
fi
# 3. Ensure user_jvm_args.txt exists and respects Pterodactyl memory
# Pterodactyl injects {{SERVER_MEMORY}} as env var SERVER_MEMORY (MB)
# Preset: medium tier (4G-8G). Adjust via presets/low|high if needed
if [ ! -f user_jvm_args.txt ]; then
echo "[Ptero] Creating user_jvm_args.txt from preset..."
if [ -f presets/medium/server/jvm-flags.txt ]; then
cp presets/medium/server/jvm-flags.txt user_jvm_args.txt
elif [ -f server_pack/../presets/medium/server/jvm-flags.txt ]; then
cp server_pack/../presets/medium/server/jvm-flags.txt user_jvm_args.txt
else
# Fallback minimal
echo "-Xms4G -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -Dlog4j2.formatMsgNoLookups=true" > user_jvm_args.txt
fi
fi
# Inject Pterodactyl memory if available (SERVER_MEMORY is in MB)
if [ -n "$SERVER_MEMORY" ]; then
echo "[Ptero] Detected Pterodactyl SERVER_MEMORY=${SERVER_MEMORY}M, patching user_jvm_args.txt..."
# Replace -Xmx value with Pterodactyl's allocation
sed -i -E "s/-Xmx[0-9]+[GM]/-Xmx${SERVER_MEMORY}M/g" user_jvm_args.txt
# Ensure -Xms is half of max or 4G min
if grep -q "MaxRAMPercentage" user_jvm_args.txt; then
sed -i -E "s/-XX:MaxRAMPercentage=[0-9.]+//g" user_jvm_args.txt
fi
fi
# 4. Ensure run.sh is executable and correct
if [ ! -f run.sh ]; then
echo "[Ptero] run.sh missing, regenerating..."
echo '#!/usr/bin/env sh' > run.sh
echo 'java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.248/unix_args.txt "$@"' >> run.sh
fi
chmod +x run.sh
echo "======================================"
echo " Starting SciCraft NeoForge 21.1.248"
echo " user_jvm_args.txt: $(cat user_jvm_args.txt | tr '\n' ' ')"
echo " unix_args.txt exists: $(test -f libraries/net/neoforged/neoforge/21.1.248/unix_args.txt && echo yes || echo no)"
echo "======================================"
# Pterodactyl expects to keep PID 1 and handle signals, so exec run.sh
exec bash run.sh nogui