diff --git a/Dockerfile b/Dockerfile
index 09fa0e70cef..451697a98ca 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.49.1
+ARG MC_HELPER_VERSION=1.49.2
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/img/modrinth-copy-project-id.png b/docs/img/modrinth-copy-project-id.png
new file mode 100644
index 00000000000..318f9145e78
Binary files /dev/null and b/docs/img/modrinth-copy-project-id.png differ
diff --git a/docs/mods-and-plugins/index.md b/docs/mods-and-plugins/index.md
index d4a005df534..34fe011e1a5 100644
--- a/docs/mods-and-plugins/index.md
+++ b/docs/mods-and-plugins/index.md
@@ -133,6 +133,14 @@ The newline delimiting allows for compose file usage like:
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
```
+!!! note "Auto-removal"
+
+ Entries that are removed from the `MODS` or `PLUGINS` list will be automatically removed from the `mods` or `plugins` directory. This is useful for removing mods/plugins that are no longer needed. An empty `MODS` or `PLUGINS` list will remove all mods/plugins.
+
+!!! note "Disable processing"
+
+ To temporarily disable processing of the `MODS` or `PLUGINS` list, then comment out the `MODS` or `PLUGINS` environment variable.
+
## Mod/Plugin URL Listing File
As an alternative to `MODS`/`PLUGINS`, the variable `MODS_FILE` or `PLUGINS_FILE` can be set with the container path or URL of a text file listing a mod/plugin URLs on each line. For example, the following
diff --git a/docs/mods-and-plugins/modrinth.md b/docs/mods-and-plugins/modrinth.md
index 1e499ea2e3d..e85981e4c04 100644
--- a/docs/mods-and-plugins/modrinth.md
+++ b/docs/mods-and-plugins/modrinth.md
@@ -2,28 +2,46 @@
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric, Forge, etc mods](https://modrinth.com/mods) and [Paper, etc plugins](https://modrinth.com/plugins), and [datapacks](https://modrinth.com/datapacks). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
-- **MODRINTH_PROJECTS** : comma or newline separated list of project slugs (short name) or IDs. The project ID is located in the "Technical information" section. The project slug is the part of the URL that follows `/mod/`, `/plugin/`, or `/datapack/`. For example:
- ```
+## Usage
+
+To use this feature, set the environment variable `MODRINTH_PROJECTS` to a comma or newline separated list of project slugs (short name) or IDs.
+
+!!! tip "Project ID"
+
+ The project ID can be copied to the clipboard from the project page menu:
+
+ 
+
+!!! tip "Project Slug"
+
+ The project slug is the part of the URL that follows `/mod/`, `/plugin/`, or `/datapack/`. For example:
+
+ ```
https://modrinth.com/mod/fabric-api
----------
|
+-- project slug
- ```
- 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 |
- |---------------------------------|-------------------------------------------------------|
- | Select latest version | `fabric-api` |
- | Select specific version | `fabric-api:bQZpGIz0`
`fabric-api:0.119.2+1.21.4` |
- | Select latest beta version | `fabric-api:beta` |
- | 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` |
+ ```
+
+Also, a specific version (or release type) can be declared by 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 `@`.
+
+### Examples
+
+| Description | Example projects entry |
+|---------------------------------|-------------------------------------------------------|
+| Select latest version | `fabric-api` |
+| Select specific version | `fabric-api:bQZpGIz0`
`fabric-api:0.119.2+1.21.4` |
+| Select latest beta version | `fabric-api:beta` |
+| 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` |
+
+### Notes
!!! info "More about listing files"
@@ -42,6 +60,14 @@
datapack:terralith
```
+!!! note "Auto-removal"
+
+ Entries that are removed from the `MODRINTH_PROJECTS` list will be automatically removed from the `mods` or `plugins` directory. This is useful for removing mods/plugins that are no longer needed. An empty `MODRINTH_PROJECTS` list will remove all mods/plugins.
+
+!!! note "Disable processing"
+
+ To temporarily disable processing of the `MODRINTH_PROJECTS` list, then comment out the `MODRINTH_PROJECTS` environment variable.
+
## Version from Projects
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`.
diff --git a/scripts/start-setupModpack b/scripts/start-setupModpack
index d948583f9c1..d2d53c9fc4f 100755
--- a/scripts/start-setupModpack
+++ b/scripts/start-setupModpack
@@ -3,10 +3,8 @@
set -e -o pipefail
: "${REMOVE_OLD_MODS:=false}"
-: "${MODS:=}"
: "${MODS_OUT_DIR:=/data/mods}"
: "${MODS_FILE:=}"
-: "${PLUGINS:=}"
: "${PLUGINS_OUT_DIR:=/data/plugins}"
: "${PLUGINS_FILE:=}"
: "${REMOVE_OLD_MODS_DEPTH:=1} "
@@ -94,7 +92,7 @@ fi
function handleListings() {
if usesMods && usesPlugins; then
- if [[ "$MODS" ]]; then
+ if [[ -v MODS ]]; then
ensureRemoveAllModsOff "MODS is set"
@@ -105,7 +103,7 @@ function handleListings() {
--to="$MODS_OUT_DIR" \
"$MODS"
fi
- if [[ "$PLUGINS" ]]; then
+ if [[ -v PLUGINS ]]; then
ensureRemoveAllModsOff "PLUGINS is set"
mkdir -p "$PLUGINS_OUT_DIR"
mc-image-helper mcopy \
@@ -140,14 +138,14 @@ function handleListings() {
outDir="$PLUGINS_OUT_DIR"
fi
- if [[ "$MODS" || "$PLUGINS" ]]; then
+ if [[ -v MODS || -v PLUGINS ]]; then
ensureRemoveAllModsOff "MODS or PLUGINS is set"
mkdir -p "$outDir"
mc-image-helper mcopy \
--glob=*.jar \
--scope=var-list \
--to="$outDir" \
- "$MODS" "$PLUGINS"
+ "${MODS:-}" "${PLUGINS:-}"
fi
if [[ "$MODS_FILE" || "$PLUGINS_FILE" ]]; then