Skip to content
Platforms

Fabric mods

Fabric mods with Codexe: what to put in the request, Minecraft and loader versions, how the Gradle/Loom build works (Java 21 for 1.20.1 targets), mixins and common issues.

Updated

On this page
  1. What to put in the request
  2. What Codexe generates
  3. How the build works
  4. Verification
  5. Common issues

Fabric is a lightweight mod loader that usually supports new Minecraft versions quickly. Codexe generates a complete Gradle project using Fabric's Loom plugin.

#What to put in the request

  • Minecraft version: "Fabric for 1.20.1", "1.21.1". Without one, 1.20.1 is used.
  • What the mod adds: blocks, items, entities, commands, keybinds, HUD elements. Be precise about behaviour.
  • Client vs server: say whether it's client-only (HUD, keybinds), server-only, or both.
  • Dependencies: Fabric API is included. Name any others (Cloth Config, Mod Menu…).
Text
A Fabric mod for 1.21.1: a "Magnet" item that pulls nearby dropped items to the player within 8 blocks while held in the offhand. Toggle with a keybind (default M). Crafting: iron ingots around a redstone block. English lang file and item model.

#What Codexe generates

  • build.gradle, gradle.properties (Minecraft, Yarn, loader and Fabric API versions) and settings.gradle.
  • fabric.mod.json with entrypoints split by environment (main, client).
  • Mixin configuration and classes when the feature needs them.
  • Assets: lang files, models, placeholder textures.

#How the build works

  • Codexe pins a stable Loom release (old -SNAPSHOT versions disappear from Fabric's repository and break builds).
  • If the requested loader, Yarn or Fabric API version doesn't exist, Codexe replaces it with a real one for that Minecraft version.
  • Loom needs a Java 21 runtime to run Gradle. For a 1.20.1 mod (which targets Java 17), Codexe runs Gradle on Java 21 while your mod is still compiled for Java 17. The JAR works on a Java 17 server.

The first mod build takes longer (often a few minutes): Loom downloads Minecraft and the mappings. Mod builds stop after 10 minutes.

#Verification

The mod is compiled before it's Ready, and the JAR must contain fabric.mod.json (or quilt.mod.json). Compiling proves it builds, not that it runs without crashing, so test it in a client.

#Common issues

SymptomLikely cause
Crash on a dedicated server mentioning client classesClient-only code in the main entrypoint. Ask the chat to move it to the client entrypoint.
"Incompatible mods found", wrong Minecraft versionThe mod targets a different Minecraft version than your game. State the exact version.
Missing Fabric API at runtimeInstall Fabric API in mods/ alongside the mod.
Fabric mods | Codexe Docs