|
2 | 2 |
|
3 | 3 | [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. |
4 | 4 |
|
5 | | -- **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: |
6 | | - ``` |
| 5 | +## Usage |
| 6 | + |
| 7 | +To use this feature, set the environment variable `MODRINTH_PROJECTS` to a comma or newline separated list of project slugs (short name) or IDs. |
| 8 | + |
| 9 | +!!! tip "Project ID" |
| 10 | + |
| 11 | + The project ID can be copied to the clipboard from the project page menu: |
| 12 | + |
| 13 | +  |
| 14 | + |
| 15 | +!!! tip "Project Slug" |
| 16 | + |
| 17 | + The project slug is the part of the URL that follows `/mod/`, `/plugin/`, or `/datapack/`. For example: |
| 18 | + |
| 19 | + ``` |
7 | 20 | https://modrinth.com/mod/fabric-api |
8 | 21 | ---------- |
9 | 22 | | |
10 | 23 | +-- project slug |
11 | | - ``` |
12 | | - 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`. |
13 | | - |
14 | | - 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. |
15 | | - |
16 | | - You can also reference a file containing project entries by prefixing the **container path** path with `@`. |
17 | | - |
18 | | - | Description | Example projects entry | |
19 | | - |---------------------------------|-------------------------------------------------------| |
20 | | - | Select latest version | `fabric-api` | |
21 | | - | Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` | |
22 | | - | Select latest beta version | `fabric-api:beta` | |
23 | | - | Latest version using project ID | `P7dR8mSH` | |
24 | | - | Latest version of datapack | `datapack:terralith` | |
25 | | - | Specific version of datapack | `datapack:terralith:2.5.5` | |
26 | | - | Projects Listing File | `@/path/to/modrinth-mods.txt` | |
| 24 | + ``` |
| 25 | + |
| 26 | +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`. |
| 27 | + |
| 28 | +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. |
| 29 | + |
| 30 | +You can also reference a file containing project entries by prefixing the **container path** path with `@`. |
| 31 | + |
| 32 | +### Examples |
| 33 | + |
| 34 | +| Description | Example projects entry | |
| 35 | +|---------------------------------|-------------------------------------------------------| |
| 36 | +| Select latest version | `fabric-api` | |
| 37 | +| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` | |
| 38 | +| Select latest beta version | `fabric-api:beta` | |
| 39 | +| Latest version using project ID | `P7dR8mSH` | |
| 40 | +| Latest version of datapack | `datapack:terralith` | |
| 41 | +| Specific version of datapack | `datapack:terralith:2.5.5` | |
| 42 | +| Projects Listing File | `@/path/to/modrinth-mods.txt` | |
| 43 | + |
| 44 | +### Notes |
27 | 45 |
|
28 | 46 | !!! info "More about listing files" |
29 | 47 |
|
|
42 | 60 | datapack:terralith |
43 | 61 | ``` |
44 | 62 |
|
| 63 | +!!! note "Auto-removal" |
| 64 | + |
| 65 | + 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. |
| 66 | + |
| 67 | +!!! note "Disable processing" |
| 68 | + |
| 69 | + To temporarily disable processing of the `MODRINTH_PROJECTS` list, then comment out the `MODRINTH_PROJECTS` environment variable. |
| 70 | + |
45 | 71 | ## Version from Projects |
46 | 72 |
|
47 | 73 | 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`. |
|
0 commit comments