Build every version with Mojang mappings instead of Yarn #49

Merged
selimaj-dev merged 3 commits from mojang-mappings into master 2026-09-30 16:17:06 +00:00
Owner

Step 1 of #39: moves every 1.21.x build from Yarn to Mojang's official mappings. Minecraft ships unobfuscated from 26.1 and 1.21.11 has the last Yarn release, so the shared src/ has to be on Mojang names before 26.x can be added.

Fixes #47, fixes #48.

Mappings (af27907)

  • mappings(loom.officialMojangMappings()), and yarn_mappings is removed from every versions/<mc>/gradle.properties.
  • Each version's sources were migrated with Loom's migrateMappings and merged back into src/, so code that's only active on other versions is migrated too.
  • Mojang renamed a few classes within 1.21.x. src/ uses the newest names, and Stonecutter replacements in stonecutter.gradle.kts swap in the older ones: Identifier→ResourceLocation before 1.21.11, AvatarRenderer/AvatarRenderState→PlayerRenderer/PlayerRenderState before 1.21.9. Package moves (PlayerModel, RenderType, Util) and renamed methods (handle(), renderOutline/submitOutline, render→submit in the cloak and hat layers) use version comments.
  • The fog mixin targets setupFog on every version. Yarn's applyFog named two methods from 1.21.6 on, so in dev it also hit updateBuffer. Released jars were already remapped to setupFog.
  • SaturnScreenFabric implements ScreenProvider.close() separately from vanilla's onClose() (#48).
  • VERSION_GUIDE.md describes the mappings and the replacements.

Ref implementations (09bc223)

Mixins that implemented a Ref method only through a same-named vanilla method now shadow it and implement the Ref method explicitly (#47). This needs the common renames from saturnclientmc/common#13, and the guide now documents the rule.

Checked

  • ./gradlew compileJava and buildAll pass for all 8 versions. remapJar gives no mixin warnings besides Fabric API's RenderPipeline$Builder one.
  • runClient on 1.21.4, 1.21.9 and 1.21.11 reaches the title screen with no mixin errors. Before the Ref fix, 1.21.4 crashed there with AbstractMethodError. The fog mixin is confirmed applied to setupFog on 1.21.11 (mixin export).
  • I haven't played in a world, so cosmetics, emotes and HUD mods still need an in-game check.
  • Set active project to 1.21.4 followed by Reset active project leaves src/ unchanged.

🤖 Generated with Claude Code

Step 1 of #39: moves every 1.21.x build from Yarn to Mojang's official mappings. Minecraft ships unobfuscated from 26.1 and 1.21.11 has the last Yarn release, so the shared `src/` has to be on Mojang names before 26.x can be added. Fixes #47, fixes #48. ## Mappings (af27907) - `mappings(loom.officialMojangMappings())`, and `yarn_mappings` is removed from every `versions/<mc>/gradle.properties`. - Each version's sources were migrated with Loom's `migrateMappings` and merged back into `src/`, so code that's only active on other versions is migrated too. - Mojang renamed a few classes within 1.21.x. `src/` uses the newest names, and Stonecutter replacements in `stonecutter.gradle.kts` swap in the older ones: `Identifier`→`ResourceLocation` before 1.21.11, `AvatarRenderer`/`AvatarRenderState`→`PlayerRenderer`/`PlayerRenderState` before 1.21.9. Package moves (`PlayerModel`, `RenderType`, `Util`) and renamed methods (`handle()`, `renderOutline`/`submitOutline`, `render`→`submit` in the cloak and hat layers) use version comments. - The fog mixin targets `setupFog` on every version. Yarn's `applyFog` named two methods from 1.21.6 on, so in dev it also hit `updateBuffer`. Released jars were already remapped to `setupFog`. - `SaturnScreenFabric` implements `ScreenProvider.close()` separately from vanilla's `onClose()` (#48). - `VERSION_GUIDE.md` describes the mappings and the replacements. ## Ref implementations (09bc223) Mixins that implemented a Ref method only through a same-named vanilla method now shadow it and implement the Ref method explicitly (#47). This needs the common renames from saturnclientmc/common#13, and the guide now documents the rule. ## Checked - `./gradlew compileJava` and `buildAll` pass for all 8 versions. `remapJar` gives no mixin warnings besides Fabric API's `RenderPipeline$Builder` one. - `runClient` on 1.21.4, 1.21.9 and 1.21.11 reaches the title screen with no mixin errors. Before the Ref fix, 1.21.4 crashed there with `AbstractMethodError`. The fog mixin is confirmed applied to `setupFog` on 1.21.11 (mixin export). - I haven't played in a world, so cosmetics, emotes and HUD mods still need an in-game check. - `Set active project to 1.21.4` followed by `Reset active project` leaves `src/` unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
selimaj-dev added 3 commits 2026-09-30 16:04:14 +00:00
Minecraft ships unobfuscated from 26.1, and 1.21.11 has the last Yarn
release, so the shared src/ has to use Mojang's names before newer
versions can be added (#39).

Each version's sources were migrated with Loom's migrateMappings and
merged back into src/, so code that is only active on other versions
is migrated too. Where Mojang's names differ between 1.21.x versions,
src/ uses the newest ones: Stonecutter replacements swap in the older
Identifier/ResourceLocation and Avatar/Player renderer names, and
version comments cover the few package moves and renamed methods.

The fog mixin now targets setupFog on every version. Yarn's applyFog
named two methods from 1.21.6 on, so it also applied to updateBuffer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Several mixins implemented a Ref method only through a vanilla method
of the same name. Released jars rename vanilla methods to intermediary
names, so those Ref methods had no implementation there and threw
AbstractMethodError: the armour display's durability, the status
effects' icon and infinite checks, the SVG texture size and the
pre-1.21.6 matrix stack's push and pop. With Mojang's names the same
happens in development (1.21.4 crashed on the title screen).

Each mixin now shadows the vanilla method and implements the Ref
method by calling it. Points common at the Ref renames this needs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Point common at its master merge commit
Check / compile (pull_request) Successful in 11m53s
55067e9761
Co-Authored-By: Claude Opus 5.5 <[email protected]>
selimaj-dev merged commit a7b2e3be8e into master 2026-09-30 16:17:06 +00:00
selimaj-dev deleted branch mojang-mappings 2026-09-30 16:17:10 +00:00
Sign in to join this conversation.