modrinth: support datapack retrieval (#3096)

This commit is contained in:
Geoff Bourne
2024-10-07 08:44:42 -05:00
committed by GitHub
parent 7974baca7e
commit 1b8b694036
3 changed files with 16 additions and 11 deletions

View File

@@ -244,14 +244,17 @@ function handleModrinthProjects() {
log " Use MODRINTH_DOWNLOAD_DEPENDENCIES=optional instead"
fi
if [[ $MODRINTH_PROJECTS ]] && isFamily HYBRID FORGE FABRIC SPIGOT; then
if [[ $MODRINTH_PROJECTS ]]; then
if isFamily HYBRID; then
loader=forge
elif isFamily VANILLA; then
loader=datapack
else
loader="${TYPE,,}"
fi
mc-image-helper modrinth \
--output-directory=/data \
--world-directory="${LEVEL:-world}" \
--projects="${MODRINTH_PROJECTS}" \
--game-version="${VERSION}" \
--loader="$loader" \