Skip to content

Commit bd98fe5

Browse files
authored
Add optional Modrinth projects support (? suffix) documentation (#4004)
1 parent 2320547 commit bd98fe5

2 files changed

Lines changed: 49 additions & 2 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
5555
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
5656

5757
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
58-
ARG MC_HELPER_VERSION=1.55.4
58+
ARG MC_HELPER_VERSION=1.56.0
5959
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
6060
# used for cache busting local copy of mc-image-helper
6161
ARG MC_HELPER_REV=1

docs/mods-and-plugins/modrinth.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,54 @@ Where:
8686

8787
To temporarily disable processing of the `MODRINTH_PROJECTS` list, then comment out the `MODRINTH_PROJECTS` environment variable.
8888

89+
## Optional projects
90+
91+
Projects that are not critical for the server to function can be marked as **optional** by appending a `?` to the project slug or ID. When a compatible version cannot be found for an optional project, the server logs a warning and continues startup instead of failing.
92+
93+
This is particularly useful for server-side mods that tend to lag behind on Minecraft updates, such as map renderers (Pl3xmap, BlueMap), performance mods (Lithium, C2ME), or admin tools (Spark, LuckPerms).
94+
95+
```yaml
96+
MODRINTH_PROJECTS: |
97+
fabric-api
98+
lithium
99+
pl3xmap?
100+
bluemap?:beta
101+
```
102+
103+
The `?` marker can be combined with all existing format options:
104+
105+
| Format | Example |
106+
|----------------------------|---------------------------|
107+
| Slug only | `pl3xmap?` |
108+
| With version | `pl3xmap?:Oa9ZDzZq` |
109+
| With release type | `pl3xmap?:beta` |
110+
| With loader prefix | `fabric:pl3xmap?` |
111+
| Full combination | `fabric:pl3xmap?:beta` |
112+
| In listing files | `pl3xmap?` *(one per line)* |
113+
114+
When combined with [`VERSION_FROM_MODRINTH_PROJECTS`](#version-from-projects), optional projects are **excluded** from the version calculation. This means an optional mod that hasn't been updated yet will never block a Minecraft version upgrade.
115+
116+
!!! example "Automatic upgrades without optional-mod breakage"
117+
118+
```yaml
119+
MODRINTH_PROJECTS: |
120+
fabric-api
121+
lithium
122+
pl3xmap?
123+
VERSION_FROM_MODRINTH_PROJECTS: true
124+
```
125+
126+
If a new Minecraft version is released and `fabric-api` + `lithium` support it but `pl3xmap` does not:
127+
128+
1. The resolved `VERSION` is set to the new version (pl3xmap is not considered)
129+
2. `fabric-api` and `lithium` are installed normally
130+
3. `pl3xmap` is skipped with a warning in the logs
131+
4. On a future restart, once pl3xmap publishes a compatible build, it is picked up automatically
132+
133+
!!! note
134+
135+
Optional projects marked with `?` in listing files (`@/path/to/file.txt`) are supported ; the `?` is parsed from each line the same way as inline entries.
136+
89137
## Version from Projects
90138

91139
When the environment variable `VERSION_FROM_MODRINTH_PROJECTS` is set to "true" the Minecraft [`VERSION`](../versions/minecraft.md) will be automatically determined by looking at the most recent version of Minecraft that is supported by all the projects provided in `MODRINTH_PROJECTS`.
@@ -115,4 +163,3 @@ When the environment variable `VERSION_FROM_MODRINTH_PROJECTS` is set to "true"
115163

116164
`MODRINTH_LOADER`
117165
: When using a custom server, set this to specify which loader type will be requested during lookups
118-

0 commit comments

Comments
 (0)