From d4af9b1ae5e1cbab07c7181a943144a1668b6df6 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 6 Oct 2024 12:07:55 -0500 Subject: [PATCH] For FTBA support extra mods with Modrinth/CurseForge (#3092) --- scripts/start-deployFTBA | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/scripts/start-deployFTBA b/scripts/start-deployFTBA index 57309b4d073..b1e4f1aa716 100755 --- a/scripts/start-deployFTBA +++ b/scripts/start-deployFTBA @@ -88,6 +88,32 @@ if ! [ -v SERVER ]; then exit 2 fi -export FAMILY=FORGE +# Remap the TYPE and FAMILY based on discovered server jar +if [[ $SERVER = run.sh ]]; then + if grep -q neoforge "$SERVER"; then + export FAMILY=FORGE + export TYPE=NEOFORGE + elif grep -q forge "$SERVER"; then + export FAMILY=FORGE + export TYPE=FORGE + elif grep -q fabric run.s; then + export FAMILY=FABRIC + export TYPE=FABRIC + else + log "ERROR: unrecognized loader type in $SERVER" + cat "$SERVER" + exit 1 + fi + +elif [[ $SERVER = forge* ]]; then + export FAMILY=FORGE + export TYPE=FORGE +elif [[ $SERVER = fabric* ]]; then + export FAMILY=FABRIC + export TYPE=FABRIC +else + log "ERROR: unrecognized loader type from $SERVER" + exit 1 +fi exec "${SCRIPTS:-/}start-setupWorld" "$@"