From 09603f40039af3f742174c4f0a3a55172253fcb9 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 13 Apr 2024 20:40:06 -0500 Subject: [PATCH] modrinth: add option to force include client mods (#2777) --- Dockerfile | 2 +- .../mod-platforms/modrinth-modpacks.md | 12 ++++++++++++ scripts/start-deployModrinth | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1282bb94..d53d1c76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \ --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz -ARG MC_HELPER_VERSION=1.38.8 +ARG MC_HELPER_VERSION=1.38.9 ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} # used for cache busting local copy of mc-image-helper ARG MC_HELPER_REV=1 diff --git a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md index ac9c772d..0be1ecb2 100644 --- a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md +++ b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md @@ -61,6 +61,18 @@ To exclude client mods that are incorrectly declared by the modpack as server-co euphoriapatcher ``` +## Force-include files + +To force include client mods, set `MODRINTH_FORCE_INCLUDE_FILES` to a comma or newline delimited list of partial file names. You may need to set `MODRINTH_FORCE_SYNCHRONIZE` to "true" while iterating on a compatible set of mods to use. + +!!! example + + In a Compose file: + ```yaml + MODRINTH_FORCE_INCLUDE: | + yet-another-config-lib + ``` + ## Excluding Overrides Files Modrinth mrpack/zip files may include an `overrides` subdirectory that contains config files, world data, and extra mod files. All of those files will be extracted into the `/data` path of the container. If any of those files, such as incompatible mods, need to be excluded from extraction, then the `MODRINTH_OVERRIDES_EXCLUSIONS` variable can be set with a comma or newline delimited list of ant-style paths ([see below](#ant-style-paths)) to exclude, relative to the overrides (or `/data`) directory. diff --git a/scripts/start-deployModrinth b/scripts/start-deployModrinth index d676a4f3..6514c7a5 100644 --- a/scripts/start-deployModrinth +++ b/scripts/start-deployModrinth @@ -11,6 +11,7 @@ resultsFile=/data/.install-modrinth.env : "${MODRINTH_VERSION:=${MODRINTH_VERSION_ID:-}}" : "${MODRINTH_IGNORE_MISSING_FILES:=}" : "${MODRINTH_EXCLUDE_FILES:=}" +: "${MODRINTH_FORCE_INCLUDE_FILES:=}" : "${MODRINTH_OVERRIDES_EXCLUSIONS:=}" if [[ ! $MODRINTH_MODPACK ]]; then @@ -57,6 +58,7 @@ setArg --loader MODRINTH_LOADER setArg --version MODRINTH_VERSION setArg --default-version-type MODRINTH_DEFAULT_VERSION_TYPE setArg --exclude-files MODRINTH_EXCLUDE_FILES +setArg --force-include-files MODRINTH_FORCE_INCLUDE_FILES setArg --overrides-exclusions MODRINTH_OVERRIDES_EXCLUSIONS if ! mc-image-helper install-modrinth-modpack "${args[@]}"; then