diff --git a/README.md b/README.md index 4bf2e2c6..38aaafd1 100644 --- a/README.md +++ b/README.md @@ -549,6 +549,13 @@ docker run -d -v /path/on/host:/data ... \ -e FABRIC_INSTALLER_URL=http://HOST/fabric-installer-0.5.0.32.jar ... ``` +A specific loader version can be requested using `FABRIC_LOADER_VERSION`, such as: + +``` +docker run -d -v /path/on/host:/data ... \ + -e FABRIC_LOADER_VERSION=0.11.7 +``` + In order to add mods, you have two options: ### Running a Limbo server diff --git a/start-deployFabric b/start-deployFabric index 5fce8d46..4f0a0d79 100755 --- a/start-deployFabric +++ b/start-deployFabric @@ -14,6 +14,7 @@ if [[ ! -e ${SERVER} ]]; then : ${FABRIC_INSTALLER:=} : ${FABRIC_INSTALLER_URL:=} + : ${FABRIC_LOADER_VERSION:=LATEST} : ${FABRIC_INSTALLER_VERSION:=${FABRICVERSION:-LATEST}} if [[ -z $FABRIC_INSTALLER && -z $FABRIC_INSTALLER_URL ]]; then @@ -31,6 +32,12 @@ if [[ ! -e ${SERVER} ]]; then exit 2 fi + if [[ -z $FABRIC_LOADER_VERSION || ${FABRIC_LOADER_VERSION^^} = LATEST ]]; then + log "Checking Fabric Loader version information." + + FABRIC_LOADER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-loader/maven-metadata.xml) + fi + if [[ ! -e $FABRIC_INSTALLER ]]; then log "Downloading $FABRIC_INSTALLER_URL ..." if ! get -o "$FABRIC_INSTALLER" "$FABRIC_INSTALLER_URL"; then @@ -39,13 +46,14 @@ if [[ ! -e ${SERVER} ]]; then fi fi - log "Installing Fabric ${VANILLA_VERSION} using $FABRIC_INSTALLER" + log "Installing Fabric ${VANILLA_VERSION} using $FABRIC_INSTALLER with loader version $FABRIC_LOADER_VERSION" tries=3 set +e while ((--tries >= 0)); do java -jar $FABRIC_INSTALLER server \ -mcversion $VANILLA_VERSION \ + -loader $FABRIC_LOADER_VERSION \ -downloadMinecraft \ -dir /data if [[ $? == 0 ]]; then