Add Cleanroom server type (#4300)

This commit is contained in:
Lilith authored and GitHub committed 2026-10-13 11:01:09 -05:00
1 parent 11b8d5b219
commit 7934d32399
4 files changed
+146 -7

No files matched your search

+6 -1
View File
@@ -283,6 +283,10 @@ case "${TYPE^^}" in
exec "$(dirname "$0")/start-deployForge" "$@"
;;
CLEANROOM)
exec "$(dirname "$0")/start-deployCleanroom" "$@"
;;
NEOFORGE|NEOFORGED)
exec "$(dirname "$0")/start-deployNeoForge" "$@"
;;
@@ -367,7 +371,8 @@ case "${TYPE^^}" in
logError "Invalid TYPE: '$TYPE'"
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, GTNH, AIRPLANE, PUFFERFISH,"
logError " CANYON, LIMBO, NANOLIMBO, PUMPKIN, CRUCIBLE, LEAF, YOUER, BANNER, NEOFORGE"
logError " CANYON, LIMBO, NANOLIMBO, PUMPKIN, CRUCIBLE, LEAF, YOUER, BANNER, NEOFORGE,"
logError " CLEANROOM"
exit 1
;;
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
: "${CLEANROOM_FORCE_REINSTALL:=false}"
# shellcheck source=start-utils
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
isDebugging && set -x
resultsFile=/data/.run-cleanroom.env
declare -a cleanroom_installer_options
cleanroom_installer_options+=(--output-directory=/data)
cleanroom_installer_options+=(--results-file="${resultsFile}")
cleanroom_installer_options+=(--force-reinstall="${CLEANROOM_FORCE_REINSTALL}")
if [[ ${CLEANROOM_LOADER_VERSION} ]]; then
cleanroom_installer_options+=(--loader-version="${CLEANROOM_LOADER_VERSION}")
fi
if [[ ${CLEANROOM_INSTALLER_VERSION} ]]; then
cleanroom_installer_options+=(--installer-version="${CLEANROOM_INSTALLER_VERSION}")
fi
if [[ ${CLEANROOM_FROM_FILE} ]]; then
cleanroom_installer_options+=(--from-local-file="${CLEANROOM_FROM_FILE}")
fi
if [[ ${CLEANROOM_FROM_URL} ]]; then
cleanroom_installer_options+=(--from-url="${CLEANROOM_FROM_URL}")
fi
if [[ ${CLEANROOM_MAVEN_URL} ]]; then
cleanroom_installer_options+=(--cleanroom-maven-url="${CLEANROOM_MAVEN_URL}")
fi
if ! mc-image-helper install-cleanroom "${cleanroom_installer_options[@]}" ; then
if [[ ${CLEANROOM_FROM_FILE} ]]; then
logError "Failed to install Cleanroom given installer ${CLEANROOM_FROM_FILE}"
elif [[ ${CLEANROOM_FROM_URL:-} ]]; then
logError "Failed to install Cleanroom from ${CLEANROOM_FROM_URL}"
else
logError "Failed to install Cleanroom"
fi
exit 1
fi
applyResultsFile ${resultsFile}
export FAMILY=FORGE
exec "$(dirname "$0")/start-setupWorld" "$@"