mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-04-24 22:39:29 +00:00
Documented the loader prefix option for MODRINTH_PROJECTS (#3720)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
FROM python:3.11
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
WORKDIR /mkdocs
|
||||
|
||||
RUN --mount=target=/build/requirements.txt,source=docs/requirements.txt \
|
||||
pip install -r /build/requirements.txt
|
||||
|
||||
FROM python:3.11
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
WORKDIR /mkdocs
|
||||
|
||||
RUN --mount=target=/build/requirements.txt,source=docs/requirements.txt \
|
||||
pip install -r /build/requirements.txt
|
||||
|
||||
ENTRYPOINT ["mkdocs"]
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,14 +1,14 @@
|
||||
# Auto-Pause
|
||||
|
||||
!!! important
|
||||
|
||||
As of [1.21.2](https://minecraft.wiki/w/Java_Edition_1.21.2) it is not recommend to use this feature since Minecraft server natively auto-pauses when the server is empty. That is configured via the enivironment variable `PAUSE_WHEN_EMPTY_SECONDS`, which maps to the `pause-when-empty-seconds` server property.
|
||||
|
||||
!!! important
|
||||
|
||||
As of [1.21.2](https://minecraft.wiki/w/Java_Edition_1.21.2) it is not recommend to use this feature since Minecraft server natively auto-pauses when the server is empty. That is configured via the enivironment variable `PAUSE_WHEN_EMPTY_SECONDS`, which maps to the `pause-when-empty-seconds` server property.
|
||||
|
||||
An auto-pause functionality is provided that monitors whether clients are connected to the server. If a client is not connected for a specified time, the Java process is put into a pause state. When a client attempts to connect while the process is paused, then process will be restored to a running state. The experience for the client does not change. This feature can be enabled by setting the environment variable `ENABLE_AUTOPAUSE` to "true".
|
||||
|
||||
!!! important
|
||||
|
||||
**You must greatly increase or disable max-tick-time watchdog functionality.** From the server's point of view, the pausing causes a single tick to take as long as the process is stopped, so the server watchdog might intervene after the process is continued, possibly forcing a container restart. To prevent this, ensure that the `max-tick-time` in the `server.properties` file is set to a very large value or -1 to disable it entirely, which is highly recommended. That can be set with `MAX_TICK_TIME` as described in [the section below](../../configuration/server-properties.md#max-tick-time).
|
||||
**You must greatly increase or disable max-tick-time watchdog functionality.** From the server's point of view, the pausing causes a single tick to take as long as the process is stopped, so the server watchdog might intervene after the process is continued, possibly forcing a container restart. To prevent this, ensure that the `max-tick-time` in the `server.properties` file is set to a very large value or -1 to disable it entirely, which is highly recommended. That can be set with `MAX_TICK_TIME` as described in [server properties](../../configuration/server-properties.md).
|
||||
|
||||
Non-vanilla versions might have their own configuration file, you might have to disable their watchdogs separately. For PaperMC servers, you need to send the JVM flag `-Ddisable.watchdog=true`, this can be done with the docker env variable `-e JVM_DD_OPTS=disable.watchdog:true`
|
||||
|
||||
|
||||
@@ -4,7 +4,29 @@
|
||||
|
||||
## 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.
|
||||
To use this feature, set the environment variable `MODRINTH_PROJECTS` to a comma or newline separated list of projects.
|
||||
|
||||
Each project entry can be any of the following combinations where a colon (`:`) is used to separate the different parts:
|
||||
|
||||
```
|
||||
Project
|
||||
Project : Version
|
||||
Project : Release Type
|
||||
Prefix : Project
|
||||
Prefix : Project : Version
|
||||
Prefix : Project : Release Type
|
||||
@ Listing File
|
||||
```
|
||||
|
||||
Where:
|
||||
|
||||
- **Project** is the project slug or ID, see below
|
||||
- **Version** is the version ID or number. When omitted, the latest release version will be selected.
|
||||
- **Release Type** is `release`, `beta`, or `alpha` indicating the latest version to select.
|
||||
- **Prefix** is `datapack`, `fabric`, `forge`, or `paper`
|
||||
- The `datapack` prefix is optional when running a vanilla server
|
||||
- The `fabric`, `forge`, and `paper` prefixes allow for installing mods/plugins that differ from server's `TYPE`. Using [Sinytra Connector](https://modrinth.com/mod/connector) is an example of this, where Fabric mods can be loaded into a NeoForge server.
|
||||
- **Listing file** is a container path to a file containing a list of projects
|
||||
|
||||
!!! tip "Project ID"
|
||||
|
||||
@@ -23,12 +45,6 @@ To use this feature, set the environment variable `MODRINTH_PROJECTS` to a comma
|
||||
+-- project slug
|
||||
```
|
||||
|
||||
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 |
|
||||
@@ -39,6 +55,7 @@ You can also reference a file containing project entries by prefixing the **cont
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Latest version of datapack | `datapack:terralith` |
|
||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||
| Mod loader override | `fabric:fabric-api`<br/>`fabric:fabric-api:bQZpGIz0` |
|
||||
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
|
||||
|
||||
### Notes
|
||||
|
||||
Reference in New Issue
Block a user