Use KettingLauncher (#2655)

This commit is contained in:
C0D3 M4513R 2024-02-11 03:04:44 +01:00 committed by GitHub
parent f3bec94065
commit a03afd7650
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 23 additions and 26 deletions

View File

@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.37.13
ARG MC_HELPER_VERSION=1.38.0
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1

View File

@ -8,7 +8,7 @@ A [Magma](https://magmafoundation.org/) server, which is a combination of Forge
!!! note
The Magma project [has been terminated](https://git.magmafoundation.org/magmafoundation/magma-1-20-x/-/commit/4e7abe37403c47d09b74b77bcfc26a19b18f5891). Please use Magma Maintained for 1.12.2, 1.18.2, 1.19.3, and 1.20.1, or Ketting for 1.20.2+.
The Magma project has been terminated ([original link died](https://git.magmafoundation.org/magmafoundation/magma-1-20-x/-/commit/4e7abe37403c47d09b74b77bcfc26a19b18f5891), [alternate statement on their discord](https://discord.com/channels/612695539729039411/647287352833605662/1174412642962649198) ). Please use Magma Maintained for 1.12.2, 1.18.2, 1.19.3, and 1.20.1, or Ketting for 1.20.1+.
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc.
@ -25,18 +25,15 @@ A [Magma Maintained](https://github.com/magmamaintained/) server, which is a alt
### Ketting
A [Ketting](https://github.com/kettingpowered/Ketting-1-20-x) server, which is a alternative project of Magma 1.20.2+, can be used with
A [Ketting](https://github.com/kettingpowered/Ketting-1-20-x) server, which is an alternative project of Magma 1.20.1+, can be used with
-e TYPE=KETTING
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.2" or later.
In addition, `FORGE_VERSION` and `KETTING_VERSION` must be specified. You can find the supported `FORGE_VERSION` in the [project page](https://github.com/kettingpowered/Ketting-1-20-x), and `KETTING_VERSION` in the [release page](https://github.com/kettingpowered/Ketting-1-20-x/releases).
!!! note
The length of `KETTING_VERSION` is 8, not 7 since it is taken from an abbreviated git commit hash. The value can be found in a jar file link on an Assets section for each releases.
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.1" or later.
`FORGE_VERSION` and `KETTING_VERSION` may be specified; however, they will be defaulted by the [Ketting launcher](https://github.com/kettingpowered/kettinglauncher) otherwise.
Available Ketting Versions may be found at [https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions](https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions).
The Version structure is `MinecraftVersion-ForgeVersion-KettingVersion` (e.g. `1.20.1-47.2.20-0.1.4` is for Minecraft `1.20.1`, Forge `47.2.20` and Ketting `0.1.4`).
### Mohist

View File

@ -240,7 +240,6 @@ case "${TYPE^^}" in
;;
KETTING)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployKetting" "$@"
;;

View File

@ -4,26 +4,27 @@
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
: "${KETTING_VERSION:=}"
: "${KETTING_TAG:=${KETTING_VERSION:0:7}}"
if ! SERVER=$(mc-image-helper github download-latest-asset \
--output-directory=/data \
--name-pattern="kettinglauncher-.+?(?<!-sources)\.jar" \
kettingpowered/kettinglauncher
); then
log "ERROR: failed to download Ketting launcher"
exit 1
fi
export SERVER
resolveVersion
if ! downloadUrl="https://github.com/kettingpowered/Ketting-1-20-x/releases/download/${KETTING_TAG}/ketting-${VERSION}-${FORGE_VERSION}-${KETTING_VERSION}-server.jar"; then
log "ERROR failed to locate latest Ketting download for ${VERSION}. Is that version supported?"
exit 1
EXTRA_ARGS+="-minecraftVersion $VERSION"
if [[ ${KETTING_VERSION:-} ]]; then
EXTRA_ARGS+="-kettingVersion $KETTING_VERSION"
fi
if [[ $downloadUrl == null ]]; then
log "ERROR Ketting does not seem to be available for $VERSION"
exit 1
fi
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
log "ERROR: failed to download Ketting server jar from $downloadUrl"
exit 1
if [[ ${FORGE_VERSION:-} ]]; then
EXTRA_ARGS+="-forgeVersion $FORGE_VERSION"
fi
export EXTRA_ARGS
export SERVER
export FAMILY=HYBRID