Skip to content

Commit a03afd7

Browse files
authored
Use KettingLauncher (#2655)
1 parent f3bec94 commit a03afd7

File tree

4 files changed

+23
-26
lines changed

4 files changed

+23
-26
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
4949
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
5050
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
5151

52-
ARG MC_HELPER_VERSION=1.37.13
52+
ARG MC_HELPER_VERSION=1.38.0
5353
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
5454
# used for cache busting local copy of mc-image-helper
5555
ARG MC_HELPER_REV=1

docs/types-and-platforms/server-types/hybrids.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A [Magma](https://magmafoundation.org/) server, which is a combination of Forge
88

99
!!! note
1010

11-
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+.
11+
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+.
1212

1313
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc.
1414

@@ -25,18 +25,15 @@ A [Magma Maintained](https://github.com/magmamaintained/) server, which is a alt
2525

2626
### Ketting
2727

28-
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
28+
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
2929

3030
-e TYPE=KETTING
3131

32-
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.2" or later.
33-
34-
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).
35-
36-
!!! note
37-
38-
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.
32+
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.1" or later.
3933

34+
`FORGE_VERSION` and `KETTING_VERSION` may be specified; however, they will be defaulted by the [Ketting launcher](https://github.com/kettingpowered/kettinglauncher) otherwise.
35+
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).
36+
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`).
4037

4138
### Mohist
4239

scripts/start-configuration

-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ case "${TYPE^^}" in
240240
;;
241241

242242
KETTING)
243-
evaluateJavaCompatibilityForForge
244243
exec "${SCRIPTS:-/}start-deployKetting" "$@"
245244
;;
246245

scripts/start-deployKetting

+16-15
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@
44
. "${SCRIPTS:-/}start-utils"
55
isDebugging && set -x
66

7-
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
8-
: "${KETTING_VERSION:=}"
9-
: "${KETTING_TAG:=${KETTING_VERSION:0:7}}"
7+
if ! SERVER=$(mc-image-helper github download-latest-asset \
8+
--output-directory=/data \
9+
--name-pattern="kettinglauncher-.+?(?<!-sources)\.jar" \
10+
kettingpowered/kettinglauncher
11+
); then
12+
log "ERROR: failed to download Ketting launcher"
13+
exit 1
14+
fi
1015

11-
resolveVersion
16+
export SERVER
1217

13-
if ! downloadUrl="https://github.com/kettingpowered/Ketting-1-20-x/releases/download/${KETTING_TAG}/ketting-${VERSION}-${FORGE_VERSION}-${KETTING_VERSION}-server.jar"; then
14-
log "ERROR failed to locate latest Ketting download for ${VERSION}. Is that version supported?"
15-
exit 1
16-
fi
18+
resolveVersion
1719

18-
if [[ $downloadUrl == null ]]; then
19-
log "ERROR Ketting does not seem to be available for $VERSION"
20-
exit 1
20+
EXTRA_ARGS+="-minecraftVersion $VERSION"
21+
if [[ ${KETTING_VERSION:-} ]]; then
22+
EXTRA_ARGS+="-kettingVersion $KETTING_VERSION"
2123
fi
22-
23-
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
24-
log "ERROR: failed to download Ketting server jar from $downloadUrl"
25-
exit 1
24+
if [[ ${FORGE_VERSION:-} ]]; then
25+
EXTRA_ARGS+="-forgeVersion $FORGE_VERSION"
2626
fi
27+
export EXTRA_ARGS
2728

2829
export SERVER
2930
export FAMILY=HYBRID

0 commit comments

Comments
 (0)