diff --git a/docs/mods-and-plugins/index.md b/docs/mods-and-plugins/index.md index 89ffa6ce777..058778fa107 100644 --- a/docs/mods-and-plugins/index.md +++ b/docs/mods-and-plugins/index.md @@ -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) diff --git a/docs/types-and-platforms/index.md b/docs/types-and-platforms/index.md index 161a185114f..49d77fed987 100644 --- a/docs/types-and-platforms/index.md +++ b/docs/types-and-platforms/index.md @@ -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. diff --git a/docs/types-and-platforms/mod-platforms/auto-curseforge.md b/docs/types-and-platforms/mod-platforms/auto-curseforge.md index 094d07631f8..84edda7e762 100644 --- a/docs/types-and-platforms/mod-platforms/auto-curseforge.md +++ b/docs/types-and-platforms/mod-platforms/auto-curseforge.md @@ -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 diff --git a/docs/types-and-platforms/mod-platforms/curseforge.md b/docs/types-and-platforms/mod-platforms/curseforge.md index 8fb4e692dd5..87e56270073 100644 --- a/docs/types-and-platforms/mod-platforms/curseforge.md +++ b/docs/types-and-platforms/mod-platforms/curseforge.md @@ -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 diff --git a/docs/types-and-platforms/mod-platforms/ftb.md b/docs/types-and-platforms/mod-platforms/ftb.md index 31368df6135..926e3146876 100644 --- a/docs/types-and-platforms/mod-platforms/ftb.md +++ b/docs/types-and-platforms/mod-platforms/ftb.md @@ -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". diff --git a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md index f7dee833017..160a6528abe 100644 --- a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md +++ b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md @@ -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 diff --git a/examples/aof7/docker-compose.yml b/examples/aof7/docker-compose.yml index 4e2c94060a1..e4b871a2d61 100644 --- a/examples/aof7/docker-compose.yml +++ b/examples/aof7/docker-compose.yml @@ -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 diff --git a/examples/atm8/docker-compose.yml b/examples/atm8/docker-compose.yml index fe8425b88cf..016dbcbbed4 100644 --- a/examples/atm8/docker-compose.yml +++ b/examples/atm8/docker-compose.yml @@ -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 diff --git a/examples/atm9/docker-compose.yml b/examples/atm9/docker-compose.yml index 19566044123..1119a144730 100644 --- a/examples/atm9/docker-compose.yml +++ b/examples/atm9/docker-compose.yml @@ -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 diff --git a/examples/auto-cf/modpack-manifest/docker-compose.yml b/examples/auto-cf/modpack-manifest/docker-compose.yml index a5240bbd917..459583b6d96 100644 --- a/examples/auto-cf/modpack-manifest/docker-compose.yml +++ b/examples/auto-cf/modpack-manifest/docker-compose.yml @@ -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 diff --git a/examples/auto-cf/using-excludes/docker-compose.yml b/examples/auto-cf/using-excludes/docker-compose.yml index 9c2d83b828a..1159bc78410 100644 --- a/examples/auto-cf/using-excludes/docker-compose.yml +++ b/examples/auto-cf/using-excludes/docker-compose.yml @@ -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 diff --git a/examples/bettermc/docker-compose.yml b/examples/bettermc/docker-compose.yml index d38e0775fff..df9ea61c1d6 100644 --- a/examples/bettermc/docker-compose.yml +++ b/examples/bettermc/docker-compose.yml @@ -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 diff --git a/examples/bmc4/docker-compose.yml b/examples/bmc4/docker-compose.yml index 3caf0f98ff7..168b7eebdfb 100644 --- a/examples/bmc4/docker-compose.yml +++ b/examples/bmc4/docker-compose.yml @@ -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 diff --git a/examples/modrinth-modpack/docker-compose.yml b/examples/modrinth-modpack/docker-compose.yml index 010fa2b4679..30b6129220f 100644 --- a/examples/modrinth-modpack/docker-compose.yml +++ b/examples/modrinth-modpack/docker-compose.yml @@ -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 diff --git a/examples/modrinth/local-modpack/docker-compose.yml b/examples/modrinth/local-modpack/docker-compose.yml index b0dfc976f8c..fb3bb2f3153 100644 --- a/examples/modrinth/local-modpack/docker-compose.yml +++ b/examples/modrinth/local-modpack/docker-compose.yml @@ -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 diff --git a/examples/one-block-modded/docker-compose.yml b/examples/one-block-modded/docker-compose.yml index 689109268cb..90a413386c7 100644 --- a/examples/one-block-modded/docker-compose.yml +++ b/examples/one-block-modded/docker-compose.yml @@ -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 diff --git a/examples/pixelmon/docker-compose.yml b/examples/pixelmon/docker-compose.yml index 98c2ac4b89a..f55119baeec 100644 --- a/examples/pixelmon/docker-compose.yml +++ b/examples/pixelmon/docker-compose.yml @@ -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" diff --git a/examples/prominence2/docker-compose.yml b/examples/prominence2/docker-compose.yml index de63129b468..db210128964 100644 --- a/examples/prominence2/docker-compose.yml +++ b/examples/prominence2/docker-compose.yml @@ -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 diff --git a/examples/rad2/compose.yaml b/examples/rad2/compose.yaml index bf1d58ec77b..fa2520c76d2 100644 --- a/examples/rad2/compose.yaml +++ b/examples/rad2/compose.yaml @@ -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 diff --git a/examples/rlcraft/docker-compose.yml b/examples/rlcraft/docker-compose.yml index e8be52d6e37..7aa7be5f5e2 100644 --- a/examples/rlcraft/docker-compose.yml +++ b/examples/rlcraft/docker-compose.yml @@ -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 diff --git a/examples/valhesia5/docker-compose.yml b/examples/valhesia5/docker-compose.yml index febde4a03ba..a52022b2999 100644 --- a/examples/valhesia5/docker-compose.yml +++ b/examples/valhesia5/docker-compose.yml @@ -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 diff --git a/examples/vault-hunters-1-18-2/docker-compose.yml b/examples/vault-hunters-1-18-2/docker-compose.yml index 393dc4474c8..2e8aa584a33 100644 --- a/examples/vault-hunters-1-18-2/docker-compose.yml +++ b/examples/vault-hunters-1-18-2/docker-compose.yml @@ -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" diff --git a/scripts/start-configuration b/scripts/start-configuration index ed398a04318..14e6ca98cc3 100755 --- a/scripts/start-configuration +++ b/scripts/start-configuration @@ -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 diff --git a/scripts/start-deployAutoCF b/scripts/start-deployAutoCF index 5df58a78946..e4b9870dfc0 100644 --- a/scripts/start-deployAutoCF +++ b/scripts/start-deployAutoCF @@ -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" diff --git a/scripts/start-deployModrinth b/scripts/start-deployModrinth index 503ec0ddce0..f22ff42f32b 100644 --- a/scripts/start-deployModrinth +++ b/scripts/start-deployModrinth @@ -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" diff --git a/scripts/start-setupModpack b/scripts/start-setupModpack index 6ef6caebc7c..aace2b51a58 100755 --- a/scripts/start-setupModpack +++ b/scripts/start-setupModpack @@ -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 diff --git a/tests/setuponlytests/auto_curseforge/docker-compose.yml b/tests/setuponlytests/auto_curseforge/docker-compose.yml index 934d0f0116b..273235042f5 100644 --- a/tests/setuponlytests/auto_curseforge/docker-compose.yml +++ b/tests/setuponlytests/auto_curseforge/docker-compose.yml @@ -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"