fix: fabric downgrading not working (#1197, #1192)

See #1192 for an in-depth explanation of the problem.

Reported-by: Erik "Coding-Kiwi"
This commit is contained in:
Levy Ehrstein 2021-12-13 20:50:20 +01:00 committed by GitHub
parent 58c085527f
commit 4e44f33db9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ fi
export SERVER=fabric-server-${VANILLA_VERSION}-${FABRIC_INSTALLER_VERSION}.jar
if [[ ! -e ${SERVER} ]]; then
if [ ! \( -e ${SERVER} -a -e "server-${VANILLA_VERSION}.jar" \) ]; then
if [[ -z $FABRIC_INSTALLER && -z $FABRIC_INSTALLER_URL ]]; then
FABRIC_INSTALLER="fabric-installer-${FABRIC_INSTALLER_VERSION}.jar"
@ -70,8 +70,12 @@ if [[ ! -e ${SERVER} ]]; then
exit 10
fi
mv server.jar "server-${VANILLA_VERSION}.jar"
mv fabric-server-launch.jar "${SERVER}"
fi
# Specify which server jar to run
echo "serverJar=server-${VANILLA_VERSION}.jar" > fabric-server-launcher.properties
export FAMILY=FABRIC
exec "${SCRIPTS:-/}start-setupWorld" "$@"