rtp-fabric-ADR-014 - Early/experimental MC 26.2 pre-release Fabric adapter¶
- Status: Accepted (2026-05-31).
- Scope:
rtp-fabric(newrtp-fabric-v26_2_R1submodule),settings.gradle,rtp-plugin/build.gradle(bytecode merge wiring), andrtp-plugin/.../fabric/RTPFabricMod.java(version dispatch). Does not touchrtp-core,rtp-api, or any Bukkit-family adapter. - Related: rtp-fabric-ADR-001 (multiversion submodule layout + runtime version dispatch), rtp-fabric-ADR-009 (obf/unobf common split that the 26.x deobf adapters consume), rtp-fabric-ADR-002 (Fabric in scope), effects-api-ADR-006.
Context¶
Mojang publishes MC 26.2 as a pre-release line (the first artifact we target is 26.2-pre-2, distributed as fabric-server-mc.26.2-pre-2-loader.0.19.2-launcher.1.1.1.jar, with Fabric API 0.150.1+26.2). The 26.2 line, like 26.1, ships fully deobfuscated, so it uses the same Loom 1.15 unobfuscated regime and JDK-25 toolchain as the existing rtp-fabric-v26_1_R1 submodule.
Preparing an adapter against the pre-release lets RTP have a working 26.2 build before 26.2 reaches final, rather than scrambling on release day. The cost is low because the per-version adapter surface is small (six classes) and the heavy lifting lives in the mapping-decoupled rtp-fabric-common / rtp-fabric-common-unobf carriers (rtp-fabric-ADR-007 / ADR-009).
Two facts shape the decision:
- Version-string dispatch.
RTPFabricMod#adapterFqnForselects an adapter by the running MC version string, which RTP resolves viaFabricLoader.getModContainer("minecraft").getMetadata().getVersion().getFriendlyString()(notSharedConstants, whose intermediary mapping drifts). For26.2-pre-2this friendly string begins with26.2, so astartsWith("26.2")prefix match catches both the pre-release builds and the eventual26.2.xfinals. - Pre-release volatility. A pre-release is a moving target; the pinned
minecraftVersion/loaderVersion/fabricApiVersionand the API the adapter binds to can change before 26.2 final.
Decision¶
Add an EARLY/EXPERIMENTAL rtp-fabric-v26_2_R1 submodule, cloned from rtp-fabric-v26_1_R1, and register it for runtime dispatch on the 26.2 line.
- New submodule
rtp-fabric/rtp-fabric-v26_2_R1/. Cloned fromv26_1_R1: same Loom 1.15 unobf plugin, JDK-25 toolchain, nomappingsline, plainimplementation/compileOnly, and theapi project(':rtp-fabric:rtp-fabric-common-unobf')carrier edge. Packageio.github.dailystruggle.rtp.fabric.v26_2_R1; the six adapter classes are renamedV26_2_R1Fabric*. Version pins: MC26.2-pre-2, loader0.19.2, fabric-api0.150.1+26.2. settings.gradle. Includertp-fabric:rtp-fabric-v26_2_R1under the existing!excludeJdk25gate (the module needs JDK 25, same asv26_1_R1; JDK-21-only hosts such as JitPack exclude it).rtp-plugin/build.gradlebytecode merge. The adapter is resolved at runtime by FQN only, so it must be merged into the shaded jar post-remapJar(Mojang names preserved, never run through Loom's intermediary remap), exactly likev26_1_R1. A dedicatedfabric262Bytecodeconfiguration carries the jar (its own configuration so the merge closure'ssingleFileresolution stays unambiguous), and a secondmergeFabricUnobfBytecodeIntoJarpass merges it into both the ProremapJarand the literemapLiteJaroutputs. The unobf carriers, already present from the first pass, are skipped by the closure's existing-entry check, so the second pass adds only thev26_2_R1adapter classes.RTPFabricMod#adapterFqnFor. Add amcVersion.startsWith("26.2")branch returningio.github.dailystruggle.rtp.fabric.v26_2_R1.V26_2_R1FabricVersionAdapter, and extend the unsupported-version message to list26.2.x.
Consequences¶
Positive¶
- RTP has a build that loads on MC 26.2 pre-releases ahead of the final release.
- Near-zero risk to existing platforms: the new module is JDK-25-gated, dispatched only on a
26.2runtime, and merged via an isolated configuration. No change tortp-core/rtp-api/ Bukkit-family code. - The clone reuses the mapping-decoupled SPI, so when 26.2 final lands the expected delta is a version re-pin plus any adapter-body fixes for API changes, not a new module.
Negative / Limitations¶
- Pre-release pin is volatile. The pinned MC / loader / fabric-api versions and the dispatch matcher must be re-verified when 26.2 reaches final. This is called out inline in the new
build.gradle, insettings.gradle, and in theadapterFqnForcomment. - Cloned bodies track
v26_1_R1. Any 26.2 API break (chunk-ticket /DistanceManagershape is the historical breakage point; see rtp-fabric-ADR-004 / ADR-006) must be ported into thev26_2_R1adapter; until verified on a live 26.2 runtime, the adapter is best treated as experimental. - JDK 25 required to build. Contributors without JDK 25 see only this submodule (and the other 26.x carriers) fail toolchain provisioning; the rest of the build remains on JDK 21.
Alternatives Considered¶
| Alternative | Why rejected |
|---|---|
| Wait for 26.2 final before adding an adapter | Defeats the purpose of preparing early; release-day scramble. The clone cost is low enough to justify tracking the pre-release. |
Extend v26_1_R1 to also match 26.2 |
The two lines may diverge in chunk-ticket / world API; a shared module would force conditional code and risk the working 26.1 path. Separate submodules mirror the existing per-line split. |
Add v26_2_R1 to the existing fabric26Bytecode configuration |
The merge closure resolves that configuration via singleFile, which throws on two jars. A dedicated fabric262Bytecode configuration keeps resolution unambiguous. |