Skip to content

Commit

Permalink
modrinth: add option to force include client mods
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg committed Apr 14, 2024
1 parent 32aa681 commit f0d7545
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions docs/types-and-platforms/mod-platforms/modrinth-modpacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions scripts/start-deployModrinth
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f0d7545

Please sign in to comment.