From c1d8dc9bb02ae69d835dd0b7faad4f04e53329a9 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 16 Oct 2022 17:49:25 -0500 Subject: [PATCH] Improved naming of FORGE_FORCE_REINSTALL and FORGE_VERSION (#1788) --- README.md | 6 ++++-- examples/docker-compose-forge-bettermcplus | 4 ++-- examples/docker-compose-generic-pack-tnp5.yml | 5 ++--- examples/docker-compose-generic-pack.yml | 2 +- examples/docker-compose-rlcraft.yml | 2 +- examples/docker-compose-spongeforge.yml | 4 ++-- scripts/start-deployForge | 7 ++++--- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 1164063c..1afc6db1 100644 --- a/README.md +++ b/README.md @@ -326,11 +326,11 @@ To troubleshoot any issues with memory allocation reported by the JVM, set the e Enable [Forge server](http://www.minecraftforge.net/) mode by adding a `-e TYPE=FORGE` to your command-line. -The overall version is specified by `VERSION`, [as described in the section above](#versions) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGEVERSION`, such as `-e FORGEVERSION=14.23.5.2854`. +The overall version is specified by `VERSION`, [as described in the section above](#versions) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGE_VERSION`, such as `-e FORGE_VERSION=14.23.5.2854`. docker run -d -v /path/on/host:/data \ -e TYPE=FORGE \ - -e VERSION=1.12.2 -e FORGEVERSION=14.23.5.2854 \ + -e VERSION=1.12.2 -e FORGE_VERSION=14.23.5.2854 \ -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server To use a pre-downloaded Forge installer, place it in the attached `/data` directory and @@ -347,6 +347,8 @@ the URL with `FORGE_INSTALLER_URL`, such as: In both of the cases above, there is no need for the `VERSION` or `FORGEVERSION` variables. +> If an error occurred while installing Forge, it might be possible to resolve by temporarily setting `FORGE_FORCE_REINSTALL` to "true". Be sure to remove that variable after successfully starting the server. + ### Running a Fabric Server Enable [Fabric server](https://fabricmc.net/) mode by adding a `-e TYPE=FABRIC` to your command-line. diff --git a/examples/docker-compose-forge-bettermcplus b/examples/docker-compose-forge-bettermcplus index 2a296ad9..aa9cc5fd 100644 --- a/examples/docker-compose-forge-bettermcplus +++ b/examples/docker-compose-forge-bettermcplus @@ -98,7 +98,7 @@ services: # # # VERSION: Defines the version of MC the modpack is based on. # # # -# FORGEVERSION: Defines the version of FORGE the modpack uses. # +# FORGE_VERSION: Defines the version of FORGE the modpack uses. # # This can usually be found in the modpack.zip as # # installer.jar # # # @@ -109,7 +109,7 @@ services: #################################################################### TYPE: FORGE VERSION: 1.16.5 - FORGEVERSION: 36.2.39 + FORGE_VERSION: 36.2.39 GENERIC_PACK: /modpacks/Better+MC+Server+Pack+PLUS+1.16.5+v40+HF.zip #################################################################### diff --git a/examples/docker-compose-generic-pack-tnp5.yml b/examples/docker-compose-generic-pack-tnp5.yml index d8215ecb..8a4e13f5 100644 --- a/examples/docker-compose-generic-pack-tnp5.yml +++ b/examples/docker-compose-generic-pack-tnp5.yml @@ -97,7 +97,7 @@ services: # # # VERSION: Defines the version of MC the modpack is based on. # # # -# FORGEVERSION: Defines the version of FORGE the modpack uses. # +# FORGE_VERSION: Defines the version of FORGE the modpack uses. # # This can usually be found in the modpack.zip as # # installer.jar # # # @@ -108,7 +108,7 @@ services: #################################################################### TYPE: FORGE VERSION: 1.18.2 - FORGEVERSION: 40.1.73 + FORGE_VERSION: 40.1.73 GENERIC_PACK: /modpacks/tnp5.zip #################################################################### @@ -144,7 +144,6 @@ services: VIEW_DISTANCE: "6" ALLOW_FLIGHT: "true" OPS: "" - VIEW_DISTANCE: 10 MAX_PLAYERS: 10 PVP: "false" LEVEL_TYPE: "biomesoplenty" diff --git a/examples/docker-compose-generic-pack.yml b/examples/docker-compose-generic-pack.yml index dfb2d152..98554706 100644 --- a/examples/docker-compose-generic-pack.yml +++ b/examples/docker-compose-generic-pack.yml @@ -11,7 +11,7 @@ services: TYPE: FORGE DEBUG: "${DEBUG:-false}" VERSION: ${VERSION:-1.17.1} - FORGEVERSION: ${FORGEVERSION:-37.0.90} + FORGE_VERSION: ${FORGE_VERSION:-37.0.90} GENERIC_PACK: /modpacks/${MODPACK:-Server-Files-0.0.21.zip} REMOVE_OLD_MODS: "${REMOVE_OLD_MODS:-false}" ports: diff --git a/examples/docker-compose-rlcraft.yml b/examples/docker-compose-rlcraft.yml index dd0eeab7..09a51fd4 100644 --- a/examples/docker-compose-rlcraft.yml +++ b/examples/docker-compose-rlcraft.yml @@ -10,7 +10,7 @@ services: EULA: "true" TYPE: "FORGE" VERSION: "1.12.2" - FORGEVERSION: "14.23.5.2860" + FORGE_VERSION: "14.23.5.2860" OVERRIDE_SERVER_PROPERTIES: "true" DIFFICULTY: "hard" MAX_TICK_TIME: "-1" diff --git a/examples/docker-compose-spongeforge.yml b/examples/docker-compose-spongeforge.yml index ec9c98ea..4eae8e97 100644 --- a/examples/docker-compose-spongeforge.yml +++ b/examples/docker-compose-spongeforge.yml @@ -14,8 +14,8 @@ services: EULA: "TRUE" #VERSION: "1.12.2" (Ensure this is compatbile with the version of SpongeForge you are using!) TYPE: "FORGE" - FORGEVERSION: "RECOMMENDED" - #FORGEVERSION: "14.23.5.2807" + FORGE_VERSION: "RECOMMENDED" + #FORGE_VERSION: "14.23.5.2807" CONSOLE: "false" ENABLE_RCON: "true" RCON_PASSWORD: "testing" diff --git a/scripts/start-deployForge b/scripts/start-deployForge index 09cf6278..ea3aff59 100755 --- a/scripts/start-deployForge +++ b/scripts/start-deployForge @@ -1,6 +1,7 @@ #!/bin/bash -: "${FORGEVERSION:=RECOMMENDED}" +: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}" +: "${FORGE_FORCE_REINSTALL:=false}}" # shellcheck source=start-utils . "${SCRIPTS:-$(dirname "$0")}/start-utils" @@ -10,8 +11,8 @@ if ! mc-image-helper install-forge \ --output-directory=/data \ --results-file=/data/.run-forge.env \ --minecraft-version="${VANILLA_VERSION}" \ - --forge-version="${FORGEVERSION}" \ - --force-reinstall="${FORCE_REINSTALL:-false}"; then + --forge-version="${FORGE_VERSION}" \ + --force-reinstall="${FORGE_FORCE_REINSTALL}"; then log "ERROR failed to install forge" exit 1 fi