#3115 rename MOD_PLATFORM to MODPACK_PLATFORM (#3120)

This commit is contained in:
Tristan
2024-10-24 14:12:13 +02:00
committed by GitHub
parent bef7b4719f
commit e69ee85f8e
27 changed files with 41 additions and 36 deletions

View File

@@ -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)

View File

@@ -1,4 +1,4 @@
# 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.
@@ -6,7 +6,7 @@ The default server type is [the official software provided by Mojang](https://ww
**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.

View File

@@ -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
@@ -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

View File

@@ -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

View File

@@ -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".

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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" "$@"
;;
@@ -184,7 +189,7 @@ if [[ $MOD_PLATFORM ]]; then
;;
*)
logError "Invalid MOD_PLATFORM: '$MOD_PLATFORM'"
logError "Invalid MODPACK_PLATFORM: '$MODPACK_PLATFORM'"
exit 1
;;
esac

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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"