diff --git a/Dockerfile b/Dockerfile index 562e7cc..eaa5825 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.5 +ARG MC_HELPER_VERSION=1.38.7 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 eb726f3..ac9c772 100644 --- a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md +++ b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md @@ -59,4 +59,35 @@ To exclude client mods that are incorrectly declared by the modpack as server-co notenoughanimations lambdynamiclights euphoriapatcher - ``` \ No newline at end of file + ``` + +## 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. + +### Ant-style paths + +Ant-style paths can include the following globbing/wildcard symbols: + +| Symbol | Behavior | +|--------|---------------------------------------------------------| +| `*` | Matches zero, one, or many characters except a slash | +| `**` | Matches zero, one, or many characters including slashes | +| `?` | Matches one character | + +!!! example + + The following compose `environment` entries show how to exclude Iris and Sodium mods from the overrides + + ```yaml + MODRINTH_OVERRIDES_EXCLUSIONS: mods/NekosEnchantedBooks-*.jar,mods/citresewn-*.jar + ``` + + or using newline delimiter, which improves maintainability + + ```yaml + MODRINTH_OVERRIDES_EXCLUSIONS: | + mods/NekosEnchantedBooks-*.jar + mods/citresewn-*.jar + ``` + diff --git a/examples/bmc4/docker-compose.yml b/examples/bmc4/docker-compose.yml new file mode 100644 index 0000000..4ead51f --- /dev/null +++ b/examples/bmc4/docker-compose.yml @@ -0,0 +1,32 @@ +services: + mc: + image: itzg/minecraft-server + environment: + EULA: true + TYPE: MODRINTH + MEMORY: 4G + MODRINTH_MODPACK: better-mc-forge-bmc4 + MODRINTH_VERSION: v4 + MODRINTH_FORCE_SYNCHRONIZE: true + MODRINTH_EXCLUDE_FILES: | + citresewn + oculus + yungsmenutweaks + notenoughanimations + ryoamiclights + euphoriapatcher + entity_model_features + entity_texture_features + 3dskinlayers + MODRINTH_OVERRIDES_EXCLUSIONS: | + mods/NekosEnchantedBooks-*.jar + mods/citresewn-*.jar + DEBUG: true + SETUP_ONLY: true + volumes: + - data:/data + ports: + - "25565:25565" + +volumes: + data: {} \ No newline at end of file diff --git a/scripts/start-deployModrinth b/scripts/start-deployModrinth index 92708e1..d676a4f 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_OVERRIDES_EXCLUSIONS:=}" if [[ ! $MODRINTH_MODPACK ]]; then log "ERROR: MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH" @@ -56,6 +57,7 @@ setArg --loader MODRINTH_LOADER setArg --version MODRINTH_VERSION setArg --default-version-type MODRINTH_DEFAULT_VERSION_TYPE setArg --exclude-files MODRINTH_EXCLUDE_FILES +setArg --overrides-exclusions MODRINTH_OVERRIDES_EXCLUSIONS if ! mc-image-helper install-modrinth-modpack "${args[@]}"; then log "ERROR failed to install Modrinth modpack"