mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-13 05:42:28 +00:00
Merge pull request #34 from nichivo/master
Fix for new Forge URLs from 1.7.10-10.13.2.1300
This commit is contained in:
commit
6570028c06
3 changed files with 15 additions and 6 deletions
|
@ -31,4 +31,4 @@ ENV MC_IMAGE=YES
|
|||
ENV UID=1000
|
||||
ENV MOTD A Minecraft Server Powered by Docker
|
||||
ENV JVM_OPTS -Xmx1024M -Xms1024M
|
||||
ENV TYPE=VANILLA VERSION=LATEST LEVEL=world PVP=true DIFFICULTY=easy
|
||||
ENV TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED LEVEL=world PVP=true DIFFICULTY=easy
|
||||
|
|
|
@ -96,11 +96,12 @@ or a specific version:
|
|||
|
||||
## Running a Forge Server
|
||||
|
||||
By default the container will run the selected "vanilla" (aka official) Minecraft server, but
|
||||
you can also choose to run the `LATEST` or a specific version of a [Forge server](http://www.minecraftforge.net/wiki/).
|
||||
Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line, such as
|
||||
Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line.
|
||||
By default the container will run the `RECOMMENDED` version of [Forge server](http://www.minecraftforge.net/wiki/)
|
||||
but you can also choose to run a specific version with `-e FORGEVERSION=10.13.4.1448`.
|
||||
|
||||
$ docker run -d -v /path/on/host:/data -e TYPE=FORGE -e VERSION=1.7.10 \
|
||||
$ docker run -d -v /path/on/host:/data -e VERSION=1.7.10 \
|
||||
-e TYPE=FORGE -e FORGEVERSION=10.13.4.1448 \
|
||||
-p 25565:25565 -e EULA=TRUE itzg/minecraft
|
||||
|
||||
In order to add mods, you will need to attach the container's `/data` directory
|
||||
|
|
|
@ -64,7 +64,15 @@ case $TYPE in
|
|||
;;
|
||||
esac
|
||||
|
||||
normForgeVersion="$norm-$FORGE_VERSION"
|
||||
# URL format changed for 1.7.10 from 10.13.2.1300
|
||||
sorted=$((echo $FORGE_VERSION; echo 10.13.2.1300) | sort -V | head -1)
|
||||
if [[ $norm == '1.7.10' && $sorted == '10.13.2.1300' ]]; then
|
||||
# if $FORGEVERSION >= 10.13.2.1300
|
||||
normForgeVersion="$norm-$FORGE_VERSION-$norm"
|
||||
else
|
||||
normForgeVersion="$norm-$FORGE_VERSION"
|
||||
fi
|
||||
|
||||
FORGE_INSTALLER="forge-$normForgeVersion-installer.jar"
|
||||
SERVER="forge-$normForgeVersion-universal.jar"
|
||||
|
||||
|
|
Loading…
Reference in a new issue