Minecraft Multiloader Skill (Architectury)
What Is Architectury?
Architectury is a framework that
lets you write one mod codebase that compiles to both NeoForge and Fabric JARs.
The common subproject has a shared API; platform subprojects implement
platform-specific behavior behind the @ExpectPlatform abstraction.
Routing Boundaries
Use when: one shared codebase must build and ship both NeoForge and Fabric artifacts.Do not use when: the project is single-loader only (minecraft-moddingfor NeoForge/Fabric, not both).Do not use when: the task is Paper/Bukkit plugin development (minecraft-plugin-dev).
| Component | Purpose |
|-----------|---------|
| architectury-loom | Gradle plugin — extends Fabric Loom for multiloader support |
| architectury-api | Runtime library — abstractions over both platforms |
| @ExpectPlatform | Annotation marking methods with platform-specific implementations |
| common/ | Shared code (no loader-specific APIs) |
| fabric/ | Fabric-specific code + entrypoint |
| neoforge/ | NeoForge-specific code + entrypoint |
Versions (Minecraft 1.21.11)
# gradle.properties property names used by this skill's static helper.
# Get every tool version from the exact generated or known-working project.
mod_version=1.0.0
minecraft_version=1.21.11
enabled_platforms=fabric,neoforge
architectury_version=<project pin>
fabric_loader_version=<project pin>
fabric_api_version=<project pin ending in +1.21.11>
neoforge_version=<project pin in the 21.11.x family>
loom_version=<project pin>
Pin architectury_version, the Architectury plugin version, and loom_version
from the same generated or known-working project line.
For a new Minecraft 26.3 / Java 25 project, use the official
and choose the exact target in the template generator. Architectury API 22 is the
26.3 line and uses dev.architectury.loom-no-remap. Keep the generated Gradle
layout and dependency pins together. If the generator lacks the requested
version, start from a resolved build on that version. For an existing project,
preserve its pins and read the porting guide only when migration is in scope.
Bundled References And Helpers
- Version alignment reference:
references/architectury-reference.md - Sanity checker:
./scripts/check-version-sanity.sh --root <project>
Run the sanity checker after editing gradle.properties. It is a static
preflight for required properties, platform names, and version families. Use
the project's Fabric and NeoForge builds and smoke tests to verify compatibility.
Root Project Layout
my-mod/
├── build.gradle ← root build (shared config)
├── settings.gradle
├── gradle.properties
├── common/
│ ├── build.gradle
│ └── src/main/java/com/example/mymod/
│ ├── MyMod.java ← shared init
│ ├── registry/
│ │ └── ModItems.java ← shared registry declarations
│ └── platform/
│ └── PlatformHelper.java ← @ExpectPlatform methods
├── fabric/
│ ├── build.gradle
│ └── src/main/
│ ├── java/com/example/mymod/fabric/
│ │ └── MyModFabric.java ← Fabric entrypoint
│ ├── java/com/example/mymod/platform/fabric/
│ │ └── PlatformHelperImpl.java ← Fabric @ExpectPlatform implementation
│ └── resources/
│ ├── fabric.mod.json
│ └── assets/...
└── neoforge/
├── build.gradle
└── src/main/
├── java/com/example/mymod/neoforge/
│ └── MyModNeoForge.java ← NeoForge @Mod entry
├── java/com/example/mymod/platform/neoforge/
│ └── PlatformHelperImpl.java ← NeoForge @ExpectPlatform implementation
└── resources/
├── META-INF/neoforge.mods.toml
└── assets/...
Legacy Build Template
The old fixed Gradle scripts were a 1.21.11 snapshot and are intentionally not
presented as a current scaffold. For either supported version, read