2017-11-01 05:42:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-10-16 22:49:25 +00:00
|
|
|
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
|
|
|
|
: "${FORGE_FORCE_REINSTALL:=false}}"
|
2021-10-17 03:32:34 +00:00
|
|
|
|
|
|
|
# shellcheck source=start-utils
|
|
|
|
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
2021-03-11 22:21:59 +00:00
|
|
|
isDebugging && set -x
|
2017-11-01 05:42:44 +00:00
|
|
|
|
2023-01-01 15:12:39 +00:00
|
|
|
if [[ ${FORGE_INSTALLER} ]]; then
|
|
|
|
if ! mc-image-helper install-forge \
|
|
|
|
--output-directory=/data \
|
|
|
|
--results-file=/data/.run-forge.env \
|
|
|
|
--minecraft-version="${VANILLA_VERSION}" \
|
|
|
|
--forge-installer="${FORGE_INSTALLER}" \
|
|
|
|
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
|
|
|
|
log "ERROR failed to install Forge given installer ${FORGE_INSTALLER}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
else
|
|
|
|
if ! mc-image-helper install-forge \
|
|
|
|
--output-directory=/data \
|
|
|
|
--results-file=/data/.run-forge.env \
|
|
|
|
--minecraft-version="${VANILLA_VERSION}" \
|
|
|
|
--forge-version="${FORGE_VERSION}" \
|
|
|
|
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
|
|
|
|
log "ERROR failed to install Forge"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-11-01 05:42:44 +00:00
|
|
|
fi
|
|
|
|
|
2023-01-01 15:12:39 +00:00
|
|
|
|
2022-08-14 18:34:08 +00:00
|
|
|
# grab SERVER and export it
|
|
|
|
set -a
|
|
|
|
source /data/.run-forge.env
|
|
|
|
set +a
|
|
|
|
|
2021-12-11 02:50:40 +00:00
|
|
|
export FAMILY=FORGE
|
2022-01-29 20:53:34 +00:00
|
|
|
|
2021-10-20 20:36:02 +00:00
|
|
|
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|