Skip to content

Commit

Permalink
For FTBA support extra mods with Modrinth/CurseForge (#3092)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Oct 6, 2024
1 parent 34187ad commit d4af9b1
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion scripts/start-deployFTBA
Original file line number Diff line number Diff line change
Expand Up @@ -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" "$@"

0 comments on commit d4af9b1

Please sign in to comment.