Skip to content

Commit 09d5b0c

Browse files
committed
Expand Forge target matrix and release validation
1 parent 2431d13 commit 09d5b0c

80 files changed

Lines changed: 2727 additions & 56 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/verify.yml‎

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,33 @@ jobs:
2727
./scripts/release/validate-targets.sh
2828
find scripts -type f -name '*.sh' -print0 | xargs -0 -n1 bash -n
2929
30+
matrix:
31+
name: Read target matrix
32+
runs-on: ubuntu-24.04
33+
timeout-minutes: 5
34+
outputs:
35+
targets: ${{ steps.targets.outputs.matrix }}
36+
steps:
37+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
38+
with:
39+
persist-credentials: false
40+
- id: targets
41+
name: Validate and export targets
42+
shell: bash
43+
run: |
44+
set -euo pipefail
45+
./scripts/release/validate-targets.sh
46+
matrix=$(jq -c '{include: [.targets[] | {target: .id, java: (.java | tostring), build_task: .build_task}]}' release/targets.json)
47+
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
48+
3049
test:
3150
name: ${{ matrix.target }} (JDK ${{ matrix.java }})
51+
needs: matrix
3252
runs-on: ubuntu-24.04
3353
timeout-minutes: 20
3454
strategy:
3555
fail-fast: false
36-
matrix:
37-
include:
38-
- target: Forge 1.20.1
39-
java: '17'
40-
tasks: ':shared:protocol:test :platform:forge-1.20.1:test'
41-
- target: Forge 1.21.1
42-
java: '21'
43-
tasks: ':shared:protocol:test :platform:forge-1.21.1:test'
44-
- target: NeoForge 1.21.1
45-
java: '21'
46-
tasks: ':shared:protocol:test :platform:neoforge-1.21.1:test'
56+
matrix: ${{ fromJSON(needs.matrix.outputs.targets) }}
4757
steps:
4858
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
4959
with:
@@ -54,4 +64,4 @@ jobs:
5464
java-version: ${{ matrix.java }}
5565
cache: gradle
5666
- name: Build and test
57-
run: ./gradlew ${{ matrix.tasks }} --no-daemon --stacktrace
67+
run: ./gradlew :shared:protocol:test ${{ matrix.build_task }} --no-daemon --stacktrace

‎branding/README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Packaged branding
2+
3+
`trueuuid-banner.png` is the canonical 960×325 Mods-screen banner. Adapter
4+
resource roots reference it through relative symlinks so every built JAR uses
5+
the same artwork without storing duplicate PNG files.
6+
7+
`TrueUUID-banner.svg` at the repository root is the separate README banner.

‎branding/trueuuid-banner.png‎

19.6 KB
Loading

‎build.gradle‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,12 @@ plugins {
33
}
44

55
tasks.named('build') {
6-
dependsOn ':shared:protocol:build', ':platform:forge-1.20.1:build', ':platform:neoforge-1.21.1:build', ':platform:forge-1.21.1:build'
6+
dependsOn ':shared:protocol:build',
7+
':platform:forge-1.20.1:build',
8+
':platform:neoforge-1.21.1:build',
9+
':platform:forge-1.21.1:build',
10+
':platform:forge-1.21.3:build',
11+
':platform:forge-1.21.4:build',
12+
':platform:forge-1.21.5:build',
13+
':platform:forge-1.21.8:build'
714
}

‎docs/architecture/target-matrix.md‎

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ An adapter is the unit of support and release; a Git branch is not.
77

88
| Target | Loader | Java | State | Notes |
99
|---|---|---:|---|---|
10-
| Minecraft 1.20.1 | Forge 47.4.10 | 17 | Active | Implemented in `platform/forge-1.20.1`; local Mojang login/UUID/name/skin run passed on 2026-07-12 with JDK 17. Yggdrasil, denial/timeout/grace, and migration rollback runs remain pending. |
11-
| Minecraft 1.21.1 | Forge 52.1.0 | 21 | Planned | Implemented independently in `platform/forge-1.21.1`; a local premium client/server login passed, but the full acceptance matrix remains incomplete. |
12-
| Minecraft 1.21.1 | NeoForge 21.1.213 | 21 | Planned | Implemented in `platform/neoforge-1.21.1`; the preserved `archive/neoforge-1.21.1-pre-monorepo` branch was API/lifecycle evidence only. Its JDK 21 build, shared fixtures, and codec/lifecycle tests pass, but no modded client/server matrix has run. |
10+
| Minecraft 1.20.1 | Forge 47.4.10 | 17 | Active | Implemented in `platform/forge-1.20.1` (independent pre-configuration-phase island). Local Mojang login/UUID/name/skin run passed on 2026-07-12 with JDK 17. Yggdrasil, denial/timeout/grace, and migration rollback runs remain pending. |
11+
| Minecraft 1.21.1 | Forge 52.1.0 | 21 | Planned | `platform/forge-1.21.1`; shares `platform/forge-common`. A local premium client/server login passed, but the full acceptance matrix remains incomplete. |
12+
| Minecraft 1.21.3 | Forge 53.1.0 | 21 | Planned | `platform/forge-1.21.3`; shares `platform/forge-common`. Build + mixin refmap + tests pass (2026-07-15). No login run yet. |
13+
| Minecraft 1.21.4 | Forge 54.1.14 | 21 | Planned | `platform/forge-1.21.4`; shares `platform/forge-common`. Build + mixin refmap + tests pass (2026-07-15). No login run yet. |
14+
| Minecraft 1.21.5 | Forge 55.1.10 | 21 | Planned | `platform/forge-1.21.5`; shares `platform/forge-common`. Build + mixin refmap + tests pass (2026-07-15). No login run yet. |
15+
| Minecraft 1.21.8 | Forge 58.1.0 | 21 | Planned | `platform/forge-1.21.8`; shares `platform/forge-common`. Uses the EventBus 7 seam. Build + mixin refmap + tests pass (2026-07-15). No login run yet. Candidate to cover 1.21.6/1.21.7 once those login runs pass. |
16+
| Minecraft 1.21.1 | NeoForge 21.1.213 | 21 | Planned | Implemented in `platform/neoforge-1.21.1`; the preserved `archive/neoforge-1.21.1-pre-monorepo` branch was API/lifecycle evidence only. Its JDK 21 build, shared fixtures, and codec/lifecycle tests pass, but no modded client/server matrix has run. NeoForge is deferred until the Forge line is login-validated. |
1317
| Minecraft 1.12.2 | Forge 14.23.5.2860 | 8 | Deferred legacy | Requires an isolated JDK 8 build and protocol-compatibility fixtures. |
1418

1519
An empty folder, version range in metadata, or successful compilation alone is
1620
not a support claim. Every supported target needs a real two-sided login run.
21+
The five modern Forge modules build and pass unit tests, but all remain Planned
22+
until each has its own login run.
1723

1824
## Recorded runtime evidence
1925

@@ -32,9 +38,13 @@ required before a release claim.
3238
|---|---|---|---|---|
3339
| 2026-07-12 | NeoForge 1.21.1 | NeoForge 21.1.213 / OpenJDK 21.0.11 | `platform/neoforge-1.21.1/build/libs/trueuuid-1.1.0-neoforge1.21.1.jar` | `:shared:protocol:test :platform:neoforge-1.21.1:build` passed. The adapter codec and lifecycle tests passed; safe endpoint verification is wired, but the real login acceptance matrix is pending. |
3440
| 2026-07-15 | Forge 1.21.1 | Forge 52.1.0 / OpenJDK 21.0.11 | `platform/forge-1.21.1/build/libs/trueuuid-1.1.0-forge1.21.1.jar` | JDK 21 build, shared fixtures, codec/lifecycle tests, and one real premium client/server login passed. The full matrix is still pending. |
41+
| 2026-07-15 | Forge 1.21.3 | Forge 53.1.0 / OpenJDK 21.0.11 | `platform/forge-1.21.3/build/libs/trueuuid-1.1.0-forge1.21.3.jar` | `:platform:forge-1.21.3:build` passed (shared `platform/forge-common` recompiled against 1.21.3 mappings; mixin refmap generated; unit tests passed). No login run. |
42+
| 2026-07-15 | Forge 1.21.4 | Forge 54.1.14 / OpenJDK 21.0.11 | `platform/forge-1.21.4/build/libs/trueuuid-1.1.0-forge1.21.4.jar` | `:platform:forge-1.21.4:build` passed (shared source recompiled against 1.21.4 mappings; refmap generated; unit tests passed). No login run. |
43+
| 2026-07-15 | Forge 1.21.5 | Forge 55.1.10 / OpenJDK 21.0.11 | `platform/forge-1.21.5/build/libs/trueuuid-1.1.0-forge1.21.5.jar` | `:platform:forge-1.21.5:build` passed (shared source recompiled against 1.21.5 mappings; refmap generated; unit tests passed). No login run. |
44+
| 2026-07-15 | Forge 1.21.8 | Forge 58.1.0 / OpenJDK 21.0.11 | `platform/forge-1.21.8/build/libs/trueuuid-1.1.0-forge1.21.8.jar` | `:platform:forge-1.21.8:build` passed against the EventBus 7 API (shared source + the `.listener` `@SubscribeEvent` seam; refmap generated; unit tests passed). No login run. |
3545

3646
These build artifacts are validation outputs, not release artifacts or runtime
37-
support claims. Both rows remain Planned until the complete acceptance matrix
47+
support claims. Every row remains Planned until the complete acceptance matrix
3848
in `docs/development/adding-adapter.md` passes, including migration rollback.
3949

4050
## Target axes
@@ -48,15 +58,59 @@ Use one module per declared target:
4858

4959
```text
5060
platform/
51-
forge-1.20.1/
52-
forge-1.21.1/
61+
forge-common/ # shared SOURCE root for the modern Forge line (not a module)
62+
forge-1.20.1/ # independent pre-configuration-phase island
63+
forge-1.21.1/ # \
64+
forge-1.21.3/ # } each recompiles forge-common against its own Forge/mappings
65+
forge-1.21.4/ # } and adds only its version-divergent shims
66+
forge-1.21.5/ # /
67+
forge-1.21.8/ # / (EventBus 7)
5368
neoforge-1.21.1/
54-
fabric-1.20.1/
5569
```
5670

5771
Directories are added only when they contain a compiling adapter. Shared code
5872
does not make an untested loader or Minecraft version supported.
5973

74+
## Modern Forge code sharing
75+
76+
The 1.20.2+ payload-based login protocol is one family. Rather than duplicate the
77+
adapter across every 1.21.x patch, the version-independent code lives once in
78+
`platform/forge-common/src/main` (a **source** root, not a Gradle module) and each
79+
per-version module compiles it against its own Forge version and Minecraft
80+
mappings via:
81+
82+
```gradle
83+
def forgeCommon = "${rootDir}/platform/forge-common/src/main"
84+
sourceSets.main.java.srcDir "${forgeCommon}/java"
85+
sourceSets.main.resources.srcDir "${forgeCommon}/resources"
86+
```
87+
88+
There is no shared bytecode — only shared source — so every module still gets a
89+
correctly remapped jar and refmap. A file may live in `forge-common` only if it
90+
compiles unchanged against *every* module that includes it. Empirically, across
91+
Forge 52 (1.21.1) → 58 (1.21.8) the only divergence is:
92+
93+
- the login/GUI mixins + `CustomQueryPayload` records + `ClientAccountStatus`
94+
(copied per module; they compile unchanged because the login classes are stable
95+
by name across the range), and
96+
- a one-file `TrueuuidForgeEvents` seam whose only version-specific line is the
97+
`@SubscribeEvent` import — `net.minecraftforge.eventbus.api.SubscribeEvent`
98+
(EventBus 6, Forge ≤ 55) vs `net.minecraftforge.eventbus.api.listener.SubscribeEvent`
99+
(EventBus 7, Forge 56+).
100+
101+
`forge-1.20.1` predates the configuration phase (different login classes, `@Mod`
102+
event API, and `ResourceLocation` constructor) and deliberately does **not** use
103+
this root. NeoForge will get the same treatment after the Forge line is
104+
login-validated.
105+
106+
### Sharing a jar across patches
107+
108+
Source is shared; a **jar** is per Forge build (each patch has its own Forge
109+
version and remapped refmap). A single module may still declare a wider
110+
`mods.toml` Minecraft range to cover adjacent patches (e.g. `forge-1.21.8`
111+
covering 1.21.6/1.21.7), but only after a two-sided login run passes on each
112+
covered patch. Modules default to their exact build patch until then.
113+
60114
## Branches and releases
61115

62116
`main` contains the complete active target matrix and is the only integration

‎gradle.properties‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ mod_version=1.1.0
4747
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
4848
mod_group_id=cn.alini
4949
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
50-
mod_authors=_YuWan
50+
mod_authors=YuWan-030, wish131400, F1xGOD
5151
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
52-
mod_description=
52+
mod_description=A Minecraft authentication mod for offline-mode servers. It securely verifies premium accounts during login while keeping each player's access token on their own client.

‎platform/forge-1.20.1/src/main/resources/META-INF/mods.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ displayName = "${mod_name}" #mandatory
2323
# A URL to query for updates for this mod. See the JSON update specification https://docs.minecraftforge.net/en/latest/misc/updatechecker/
2424
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
2525
# A URL for the "homepage" for this mod, displayed in the mod UI
26-
displayURL = "https://github.com/YuWan-030" #optional
26+
displayURL = "https://github.com/YuWan-030/TrueUUID" #optional
2727
# A file name (in the root of the mod JAR) containing a logo for display
28-
#logoFile="trueuuid.png" #optional
28+
logoFile="trueuuid-banner.png" #optional
2929
# A text field displayed in the mod UI
3030
#credits="Thanks for this example mod goes to Java" #optional
3131
# A text field displayed in the mod UI
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../branding/trueuuid-banner.png

‎platform/forge-1.21.1/build.gradle‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ base {
3131
archivesName = 'trueuuid'
3232
}
3333

34+
// Version-independent adapter code (entrypoint, config, runtime, registry,
35+
// login flow, net ids, mixin plugin) and identical resources (lang, mixins
36+
// config, pack.mcmeta) live once in platform/forge-common and are compiled by
37+
// every per-version Forge module against its own Forge/mappings. Only the
38+
// version-divergent shims (mixins, payloads, client render, mods.toml) stay in
39+
// this module's own src tree.
40+
def forgeCommon = "${rootDir}/platform/forge-common/src/main"
41+
sourceSets.main.java.srcDir "${forgeCommon}/java"
42+
sourceSets.main.resources.srcDir "${forgeCommon}/resources"
43+
3444
java {
3545
toolchain.languageVersion = JavaLanguageVersion.of(21)
3646
}

‎platform/forge-1.21.1/src/main/java/cn/alini/trueuuid/Trueuuid.java‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)