Port a mod to Minecraft 26.1
Checked against Fabric’s and NeoForge’s documentation on 2 November 2026.
26.1 is the first Minecraft version that ships without obfuscation. The game now runs with Mojang’s own names. No mod built for 1.21.11 or older runs on 26.1 without at least a recompile (Fabric, 14 March 2026).
What changes
Section titled “What changes”| 1.21.11 | 26.1 | |
|---|---|---|
| Java | 21 | 25 |
| Names in your code | Mojang names or Yarn (Fabric), often with Parchment on top | Mojang’s names, built into the game. No mappings. |
| Fabric’s Gradle plugin | fabric-loom or net.fabricmc.fabric-loom-remap |
net.fabricmc.fabric-loom |
The Java versions come from Mojang’s own version files
(version manifest: javaVersion.majorVersion is 21
for 1.21.11 and 25 for 26.1). Gradle needs updating too: NeoForge says 26.1 needs Gradle 9.1.0 or newer
(NeoForge, 24 March 2026), and Fabric says the JVM that runs Gradle must be
Java 25 or newer (Fabric, 14 March 2026).
The order of work
Section titled “The order of work”- Commit or back up your mod. Some steps below rewrite your source files.
- Fabric mods on Yarn: move to Mojang names first, while still on 1.21.11. Fabric says Yarn is not supported on 26.1
and to migrate before you change the Minecraft version. See Yarn to Mojang names and
Loom’s
migrateMappingstask. - Update the build. Fabric: the list below. NeoForge: NeoForge 26.1 porting notes.
- Swap every dependency for a 26.1 build. Fabric’s porting page says no mod made for 1.21.11 or older works on 26.1, not even as a compile-only dependency.
- Fix the code. Fabric API renamed its own classes and methods to match Mojang’s names; for example
ItemGroupEventsbecameCreativeModeTabEvents. Fabric keeps the full list in its Fabric API 26.1 porting guide. For changes in the game’s own code, read NeoForge’s 1.21.11 → 26.1 primer. It covers vanilla classes only, so it helps on any loader. - Check your mixins. See Mixins on 26.1.
- Build and run the game. Fix what breaks, then test on a dedicated server too.
Fabric: the build changes
Section titled “Fabric: the build changes”These steps are from Fabric’s Porting to 26.1 page, in order:
-
Update Gradle:
Terminal window ./gradlew wrapper --gradle-version latest -
Bump Minecraft, Fabric Loader, Loom and Fabric API. Fabric recommends doing it in
gradle.properties. The current versions are on fabricmc.net/develop. -
Change the plugin id at the top of
build.gradletonet.fabricmc.fabric-loom. Ifsettings.gradlenames Loom, change it there too. -
Delete the
mappingsline fromdependencies. -
Replace
modImplementation,modCompileOnlyandmodApiwithimplementation,compileOnlyandapi. -
Remove or replace every mod made for versions before 26.1.
-
In your access widener or class tweaker file, change
namedtoofficialin the first line. -
Set Java to 25 instead of 21.
-
Replace
remapJarwithjar. -
Refresh Gradle. If that doesn’t pick up the changes, run
./gradlew --refresh-dependencies.
Two more from Fabric’s 26.1 post:
- If
fabric.mod.jsondepends onfabric, change it tofabric-api. Fabric API no longer provides thefabricid. - The post named Loom 1.15 and Gradle 9.4.0 “at the time of writing” (14 March 2026). Use the versions on fabricmc.net/develop today.
This is the result in Linen’s Fabric 26.1.2 template, generated with Fabric’s @fabricmc/cli
(gradle.properties: minecraft_version=26.1.2, loader_version=0.19.5, loom_version=1.18.2,
fabric_api_version=0.155.3+26.1.2):
plugins { id 'net.fabricmc.fabric-loom' version "${loom_version}" id 'maven-publish'}
dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" implementation "net.fabricmc:fabric-loader:${project.loader_version}" implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"}
java { toolchain { languageVersion = JavaLanguageVersion.of(25) }}Going past 26.1
Section titled “Going past 26.1”Port to 26.1 first, then one version at a time. Fabric’s docs have a porting page per version (pick the version at the top right of docs.fabricmc.net). NeoForge has primers for 26.1.x → 26.2 and 26.2 → 26.3.
In Linen
Section titled “In Linen”Linen has no porting assistant and no mappings-migration button yet. Porting with Linen today means using its tools and talking it through with Claude Code:
- New mod makes a clean project for 26.1 or newer, so you can compare its build files with yours. Linen also opens a folder with one version per subfolder, so your 1.21.11 and 26.1 copies can sit side by side.
- Linen installs Java 25 for a 26.x project.
- Find usages and Minecraft’s code browse the decompiled game for each project’s own version, on your machine. Look up how vanilla used a method in 1.21.11, then how it does the same thing in 26.1.
- Linen Check reads registrations, models, loot tables, names, mixins and the build, and names the file and the fix.
- Claude Code, Anthropic’s extension, runs on your own Claude plan. In Linen it gets Linen’s tools (
lookup_symbol,search_source,vanilla_examples,linen_decompile,linen_mappings,gradleand others) and Linen Check after every edit. Ask it to work through the steps above with you.