Skip to content

Commit d448751

Browse files
committed
autotester: use upstream HeadlessMC 2.10.0
1 parent be756db commit d448751

4 files changed

Lines changed: 17 additions & 49 deletions

File tree

autotester/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,14 @@ The client image builds its HeadlessMC launcher from the git repo and ref in
8787

8888
```yaml
8989
headlessmc:
90-
repo: "https://github.com/Skidamek/headlessmc.git"
91-
ref: "64d3c126e72bbfccf95e71afaa6536f50bc64097" # branch, tag, or commit SHA
90+
repo: "https://github.com/headlesshq/headlessmc.git"
91+
ref: "2.10.0" # branch, tag, or commit SHA
9292
```
9393
94-
`ref` may be a branch, tag, or commit SHA; it is pinned to a SHA here for
95-
reproducible image builds. This default ref carries the patch required to launch
96-
**MC 26.2** headlessly
97-
(stock HeadlessMC can't yet — its LWJGL stubs don't satisfy 26.2's new render
98-
backend); it does not change behavior on other versions. Point `repo`/`ref` at
99-
any other HeadlessMC build and rebuild the image
100-
(`uv --project autotester run autotester build-images`). If they are unset, the
101-
build falls back to upstream HeadlessMC (`headlesshq/headlessmc`).
94+
`ref` may be a branch, tag, or commit SHA; the default uses the immutable
95+
upstream 2.10.0 release for reproducible image builds and Minecraft 26.2
96+
support. Point `repo`/`ref` at another HeadlessMC build and rebuild the image
97+
with `uv --project autotester run autotester build-images`.
10298

10399
## Scenarios
104100

autotester/docker/client/Dockerfile

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Git repository and ref the HeadlessMC launcher is built from. These are
22
# normally supplied by `autotester build-images` from settings.yaml
3-
# (headlessmc.repo/ref). The defaults below are only a fallback for a bare
4-
# `docker build` and point at upstream HeadlessMC; set headlessmc.repo/ref in
5-
# settings.yaml to build a patched launcher (e.g. for MC 26.2 headless).
3+
# (headlessmc.repo/ref). The defaults also use the pinned upstream release.
64
ARG HEADLESSMC_REPO=https://github.com/headlesshq/headlessmc.git
7-
ARG HEADLESSMC_REF=main
5+
ARG HEADLESSMC_REF=2.10.0
86

97
# ── Builder: compile the HeadlessMC launcher wrapper jar ──────────────
108
# HeadlessMC must be built with JDK 21 (its Gradle build rejects newer JDKs).
@@ -35,37 +33,18 @@ FROM ubuntu:26.04
3533
ENV DEBIAN_FRONTEND=noninteractive
3634
ENV HMC_HOME=/work/hmc-cache
3735

38-
# Install Java 17, 21, 25 from repos. Two things newer FancyModLoader (21.10+/26.x) needs that
39-
# the previous headless-only setup didn't provide:
40-
# - The full (non-headless) *-jre packages: FatalErrorReporting.reportFatalError tries a Swing
41-
# dialog even in headless mode - if it can't (java.desktop's libawt_xawt.so is only shipped
42-
# by the non-headless package), that UnsatisfiedLinkError itself crashes the client and
43-
# replaces the real error in the log, making any such failure undiagnosable.
44-
# - xvfb (below): even with -Djava.awt.headless=true, this JDK's HeadlessGraphicsEnvironment
45-
# still wraps a real X11GraphicsEnvironment internally on Linux and fails without a display
46-
# to connect to - so Swing dialogs need a (virtual) X server regardless of the headless flag.
36+
# HeadlessMC's LWJGL transformer does not need an X server or desktop Java runtime.
4737
RUN apt-get update \
4838
&& apt-get install -y --no-install-recommends \
4939
ca-certificates \
5040
curl \
5141
unzip \
5242
bash \
5343
procps \
54-
xvfb \
5544
libatomic1 \
56-
libx11-6 \
57-
libxext6 \
58-
libxrender1 \
59-
libxtst6 \
60-
libxi6 \
61-
libxrandr2 \
62-
libxxf86vm1 \
63-
libgl1 \
64-
libglx-mesa0 \
65-
libasound2t64 \
66-
openjdk-17-jre \
67-
openjdk-21-jre \
68-
openjdk-25-jre \
45+
openjdk-17-jre-headless \
46+
openjdk-21-jre-headless \
47+
openjdk-25-jre-headless \
6948
&& rm -rf /var/lib/apt/lists/*
7049

7150
RUN mkdir -p /opt/headlessmc /opt/automodpack /work/game /work/hmc-cache \

autotester/docker/client/run-headlessmc-client

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,5 @@ timeout 20 hmc --command "download ${minecraft}" 2>/dev/null || true
124124
hmc --command "config -refresh" 2>/dev/null || true
125125

126126
# ── Launch ─────────────────────────────────────────────────────────
127-
# xvfb-run: newer FancyModLoader's fatal-error Swing dialog needs a real X display even with
128-
# -Djava.awt.headless=true (see Dockerfile) - give it a virtual one so a genuine fatal error
129-
# reports its real cause instead of crashing on top of it with an unrelated X11/AWT error.
130-
exec timeout "$client_timeout" xvfb-run -a hmc \
127+
exec timeout "$client_timeout" hmc \
131128
--command "launch ${launch_target} -lwjgl -offline --jvm \"${jvmargs}\" ${gameargs}"

autotester/settings.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,10 @@ serverTypes:
3636
neoforge: NEOFORGE
3737

3838
headlessmc:
39-
# Git repository and ref the HeadlessMC launcher is built from. The default
40-
# builds the patch required to launch MC 26.2 headlessly; point these at a
41-
# different repo/ref to use another HeadlessMC build. ref may be a branch, tag
42-
# or commit SHA — pinned to a SHA here for reproducible builds (this is the
43-
# head of the mc26.2-headless branch; bump it when the fork moves, or switch
44-
# to the upstream tag once the patch is merged upstream).
45-
repo: "https://github.com/Skidamek/headlessmc.git"
46-
ref: "64d3c126e72bbfccf95e71afaa6536f50bc64097"
39+
# Git repository and ref the HeadlessMC launcher is built from. ref may be a
40+
# branch, tag, or commit SHA; pin the upstream release for reproducible builds.
41+
repo: "https://github.com/headlesshq/headlessmc.git"
42+
ref: "2.10.0"
4743

4844
timeouts:
4945
serverStartSeconds: 180

0 commit comments

Comments
 (0)