Guide
How to make a Fabric mod
Updated October 7, 2026
Fabric is a lightweight mod loader that follows new Minecraft versions quickly. A Fabric mod is a Gradle project built with the Loom plugin, with a fabric.mod.json that tells the loader what the mod is. Players install it on their client (and the server, if the mod adds content).
An example to start from.
Generate this with CodexeStep by step
1.Pick the Minecraft and loader version
Mods are built for one Minecraft version. Fabric API and the loader versions must match it.
2.Set up the Gradle project
Loom, the Minecraft and mappings dependencies, Fabric API, and Java 21 for current versions.
3.Write fabric.mod.json
The mod id, name, version, entrypoints (
main,client) and dependencies.4.Write the code
Register items, blocks and events in the entrypoint. Mixins change vanilla code when no event exists.
5.Build and run
./gradlew buildproduces the mod .jar inbuild/libs/; put it in themods/folder with Fabric Loader and Fabric API.
With Codexe
Describe the mod and the version ("Fabric 1.21.1"). Codexe generates the complete Loom project, compiles it with the right Java and Gradle, repairs build errors and checks that the .jar contains a valid fabric.mod.json. Minecraft 26.x mods use the new unobfuscated toolchain, which Codexe supports.
Questions
Fabric or Forge?
Fabric is lighter and updates faster; Forge and NeoForge have large mod ecosystems on some versions. Pick the loader your modpack or players use.
Can a Fabric mod run on a server?
Yes, if it is written for it. Mods that add content must be installed on the server and on the clients.
Make a Fabric mod
This prompt opens ready to send:
“A Fabric 1.21.1 mod that adds a Copper Hammer: a tool that mines a 3x3 area, crafted from copper ingots and a stick, with a texture, a crafting recipe and an English name.”
Generate this with Codexe