From d8075916e3f2b5e052595b6f5ca2ca142166b8e8 Mon Sep 17 00:00:00 2001 From: fireph <443370+fireph@users.noreply.github.com> Date: Sun, 22 Jun 2025 06:02:13 -0700 Subject: [PATCH] Add support for Modrinth projects file (#3506) --- Dockerfile | 2 +- docs/mods-and-plugins/modrinth.md | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index de811dd2..96fd185c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,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.43.1 +ARG MC_HELPER_VERSION=1.45.0 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/mods-and-plugins/modrinth.md b/docs/mods-and-plugins/modrinth.md index e4bd787e..648f3e1e 100644 --- a/docs/mods-and-plugins/modrinth.md +++ b/docs/mods-and-plugins/modrinth.md @@ -12,6 +12,8 @@ Also, a specific version (or release type) can be declared adding a colon and then the version id, version number/name, or release type after the project slug. The version ID or number can be found in the 'Metadata' section. Valid release types are `release`, `beta`, `alpha`. To select a datapack from a Modrinth project, prefix the entry with "datapack:". When running a vanilla server, this is optional since only datapacks will be available for vanilla servers to select. + + You can also reference a file containing project entries by prefixing the **container path** path with `@`. | Description | Example projects entry | |---------------------------------|-------------------------------------------------------| @@ -21,6 +23,24 @@ | Latest version using project ID | `P7dR8mSH` | | Latest version of datapack | `datapack:terralith` | | Specific version of datapack | `datapack:terralith:2.5.5` | + | Projects Listing File | `@/path/to/modrinth-mods.txt` | + +!!! info "More about listing files" + + Each line in the listing file is processed as one of the references above; however, blank lines and comments that start with `#` are ignored. + + Make sure to place the listing file in a mounted directory/volume or declare an appropriate mount for it. + + For example, `MODRINTH_PROJECTS` can be set to "@/extras/modrinth-mods.txt", assuming "/extras" has been added to `volumes` section, where the container file `/extras/modrinth-mods.txt` contains + + ```text + # This comment is ignored + fabric-api + + # This and previous blank line are ignore + cloth-config + datapack:terralith + ``` ## Extra options