Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename MOD_PLATFORM to MODPACK_PLATFORM #3120

Merged
merged 9 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/mods-and-plugins/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Working with mods and plugins

## Mod platforms
## Modpack platforms

By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported mod platforms](../types-and-platforms/index.md).
By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported modpack platforms](../types-and-platforms/index.md).

The following are some supported mod platforms:
The following are some supported modpack platforms:

- [Modrinth](../types-and-platforms/mod-platforms/modrinth-modpacks.md)
- [CurseForge](../types-and-platforms/mod-platforms/auto-curseforge.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/types-and-platforms/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Server Types and Mod Platforms
# Server Types and Modpack Platforms

Server types can be selected by setting the `TYPE` environment variable to one of the types described in these sections.

The default server type is [the official software provided by Mojang](https://www.minecraft.net/en-us/download/server), which can be explicitly selected by setting `TYPE` to "VANILLA".

**From the sections to the left...**

The **mod platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The mod platforms are selected by setting `MOD_PLATFORM`; however, for ease of use and compatibility, the selection can be set in `TYPE`.
The **modpack platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The modpack platforms are selected by setting `MODPACK_PLATFORM`; however, for ease of use and backward compatibility, the selection can be set in `TYPE` or `MOD_PLATFORM`.

The individual **server types** allow for selecting the mod loader / server type and specific versions of those.

Expand Down
4 changes: 2 additions & 2 deletions docs/types-and-platforms/mod-platforms/auto-curseforge.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Auto CurseForge

To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.
To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.

## API Key

Expand Down Expand Up @@ -116,7 +116,7 @@ If you wish to use an unpublished modpack zip, set the container path to the fil
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_MODPACK_MANIFEST: /manifests/manifest.json
Expand Down
2 changes: 1 addition & 1 deletion docs/types-and-platforms/mod-platforms/curseforge.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This mod platform type is deprecated. Please use [AUTO_CURSEFORGE](auto-curseforge.md) for new deployments.

Enable this server mode by setting `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables.
Enable this server mode by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables.

You need to specify a modpack to run, using the `CF_SERVER_MOD` environment
variable. A CurseForge server modpack is available together with its respective
Expand Down
2 changes: 1 addition & 1 deletion docs/types-and-platforms/mod-platforms/ftb.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
!!! note
Requires one of the Ubuntu with Hotspot images listed in [the Java versions section](../../versions/java.md).

[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MOD_PLATFORM` or `TYPE` to "FTBA"
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "FTBA"

!!! note
The "A" at the end of "FTBA" is important. The value "FTB" used to be an alias for "CURSEFORGE".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Modrinth Modpacks

[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.

## Modpack project

Expand Down
2 changes: 1 addition & 1 deletion examples/aof7/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# from .env
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-of-fabric-7
Expand Down
2 changes: 1 addition & 1 deletion examples/atm8/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
Expand Down
2 changes: 1 addition & 1 deletion examples/atm9/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-9
Expand Down
2 changes: 1 addition & 1 deletion examples/auto-cf/modpack-manifest/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_MODPACK_MANIFEST: /manifests/manifest.json
Expand Down
2 changes: 1 addition & 1 deletion examples/auto-cf/using-excludes/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/minecraft-eternal/files/4102634
Expand Down
2 changes: 1 addition & 1 deletion examples/bettermc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: better-mc-fabric-bmc1
Expand Down
2 changes: 1 addition & 1 deletion examples/bmc4/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: MODRINTH
MODPACK_PLATFORM: MODRINTH
MODRINTH_MODPACK: https://modrinth.com/modpack/better-mc-forge-bmc4/version/v32.5
MODRINTH_EXCLUDE_FILES: |
XaeroPlus
Expand Down
2 changes: 1 addition & 1 deletion examples/modrinth-modpack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- "25565:25565"
environment:
EULA: "TRUE"
MOD_PLATFORM: MODRINTH
MODPACK_PLATFORM: MODRINTH
MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
# or for auto-upgrading to latest
# MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric
Expand Down
2 changes: 1 addition & 1 deletion examples/modrinth/local-modpack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: MODRINTH
MODPACK_PLATFORM: MODRINTH
# Download the mrpack file from https://modrinth.com/modpack/cobblemon-fabric/version/1.4.1 and place in
# modpacks directory next to this compose file.
MODRINTH_MODPACK: /modpacks/Cobblemon Modpack [Fabric] 1.4.1.mrpack
Expand Down
2 changes: 1 addition & 1 deletion examples/one-block-modded/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# CF_API_KEY=... must be set in .env file or as environment variable
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: one-block-modded
Expand Down
2 changes: 1 addition & 1 deletion examples/pixelmon/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
CF_SLUG: the-pixelmon-modpack
CF_FILENAME_MATCHER: "9.1.2"
Expand Down
2 changes: 1 addition & 1 deletion examples/prominence2/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/prominence-2-rpg
Expand Down
2 changes: 1 addition & 1 deletion examples/rad2/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/roguelike-adventures-and-dungeons-2
Expand Down
2 changes: 1 addition & 1 deletion examples/rlcraft/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
image: itzg/minecraft-server:java8-multiarch
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: rlcraft
Expand Down
2 changes: 1 addition & 1 deletion examples/valhesia5/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
CF_FORCE_SYNCHRONIZE: "true"
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/valhelsia-5/files/4429560
Expand Down
2 changes: 1 addition & 1 deletion examples/vault-hunters-1-18-2/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
CF_SLUG: vault-hunters-1-18-2
CF_FILENAME_MATCHER: "Update-10.0.0"
Expand Down
15 changes: 10 additions & 5 deletions scripts/start-configuration
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,20 @@ then
"${SCRIPTS:-/}start-rconcmds"
fi

: "${MOD_PLATFORM:=}"
: "${MODPACK_PLATFORM:=${MOD_PLATFORM:-}}"

if [[ $MODPACK_PLATFORM && $TYPE ]]; then
logWarning "Avoid setting TYPE and MODPACK_PLATFORM"
fi

case "${TYPE^^}" in
AUTO_CURSEFORGE|MODRINTH|CURSEFORGE|FTB|FTBA)
MOD_PLATFORM="$TYPE"
MODPACK_PLATFORM="$TYPE"
;;
esac

if [[ $MOD_PLATFORM ]]; then
case "${MOD_PLATFORM^^}" in
if [[ $MODPACK_PLATFORM ]]; then
case "${MODPACK_PLATFORM^^}" in
FTB|CURSEFORGE)
exec "${SCRIPTS:-/}start-deployCF" "$@"
;;
Expand All @@ -184,7 +189,7 @@ if [[ $MOD_PLATFORM ]]; then
;;

*)
logError "Invalid MOD_PLATFORM: '$MOD_PLATFORM'"
logError "Invalid MODPACK_PLATFORM: '$MODPACK_PLATFORM'"
exit 1
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion scripts/start-deployAutoCF
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resultsFile=/data/.install-curseforge.env

isDebugging && set -x

ensureRemoveAllModsOff "MOD_PLATFORM=AUTO_CURSEFORGE"
ensureRemoveAllModsOff "MODPACK_PLATFORM=AUTO_CURSEFORGE"

args=(
--results-file="$resultsFile"
Expand Down
4 changes: 2 additions & 2 deletions scripts/start-deployModrinth
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ resultsFile=/data/.install-modrinth.env
: "${MODRINTH_DEFAULT_EXCLUDE_INCLUDES=/image/modrinth-exclude-include.json}"

if [[ ! $MODRINTH_MODPACK ]]; then
logError "MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH"
logError "MODRINTH_MODPACK must be set when using TYPE/MODPACK_PLATFORM/MOD_PLATFORM of MODRINTH"
exit 1
fi

isDebugging && set -x

ensureRemoveAllModsOff "MOD_PLATFORM=MODRINTH"
ensureRemoveAllModsOff "MODPACK_PLATFORM=MODRINTH"

args=(
--results-file="$resultsFile"
Expand Down
2 changes: 1 addition & 1 deletion scripts/start-setupModpack
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ handleListings

if [[ $MANIFEST ]]; then
logError "MANIFEST is no longer supported."
logError " Use MOD_PLATFORM=AUTO_CURSEFORGE and CF_MODPACK_MANIFEST instead"
logError " Use MODPACK_PLATFORM=AUTO_CURSEFORGE and CF_MODPACK_MANIFEST instead"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion tests/setuponlytests/auto_curseforge/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
environment:
EULA: "true"
SETUP_ONLY: "TRUE"
MOD_PLATFORM: AUTO_CURSEFORGE
MODPACK_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: the-pixelmon-modpack
CF_FILENAME_MATCHER: "9.1.2"
Expand Down