Create your own Minecraft mods with the help of Claude Code! Just describe what you want your mod to do, and Claude will build it for you.
Before you start, make sure you have:
-
Java 21 — The programming language Minecraft mods use
- Mac: Open Terminal and run:
brew install openjdk@21 - Windows: Download from Adoptium (pick "Temurin 21")
- Linux: Run:
sudo apt install openjdk-21-jdk
- Mac: Open Terminal and run:
-
Minecraft with Fabric Loader — So you can test your mod
- Install the Fabric Loader for Minecraft 1.21.1
- Also install the Fabric API mod (put the JAR in your
modsfolder)
-
Claude Code — The AI assistant that will build your mod
- Follow the setup instructions at claude.com/claude-code
Click the green "Use this template" button at the top of this page to create your own copy.
git clone https://github.com/YOUR-USERNAME/YOUR-MOD-NAME.git
cd YOUR-MOD-NAMEIf you installed Java with Homebrew on Mac, run this first:
export JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/HomeBefore adding anything, check that the template compiles:
./gradlew buildYou should see BUILD SUCCESSFUL. If not, check the troubleshooting section below.
Open Claude Code in your project folder:
claudeThen type your mod idea using the /design-mod command:
/design-mod A friendly dragon that follows you around and breathes fire at enemies
Claude will:
- Ask you some fun questions about your mod idea
- Help you pick a cool name for it
- Write up a plan and show it to you
- Build the whole mod once you approve the plan
- Tell you how to test it in Minecraft
After Claude builds your mod, run:
./gradlew runClientThis opens Minecraft with your mod loaded! Follow the testing instructions Claude gives you.
Run this command before building:
# Mac (Homebrew)
export JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home
# Linux
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
# Windows (PowerShell)
$env:JAVA_HOME = "C:\Program Files\Eclipse Adoptium\jdk-21"This happens the first time you build — Gradle needs to download Minecraft and the modding tools. It can take a few minutes on a slow connection. Just let it run!
Make sure you have Java 21 (not an older version):
java -versionIt should say something like openjdk version "21.x.x".
- Make sure you have the Fabric Loader installed for version 1.21.1
- Make sure the Fabric API mod JAR is in your
modsfolder - Check the
logs/latest.logfile for error messages
This template is a minimal Fabric mod that compiles and runs but doesn't add anything to the game yet. When you run /design-mod, Claude:
- Reads about what's possible in Minecraft modding
- Helps you design your mod through a conversation
- Creates all the Java code, textures, sounds, and config files
- Makes sure it compiles and gives you testing instructions
The mod uses Fabric (a Minecraft modding framework) for Minecraft version 1.21.1.
your-mod/
├── src/main/ # Server & shared code + all resources
│ ├── java/ # Java source files
│ └── resources/ # Textures, sounds, config files
├── src/client/ # Client-only code (rendering, models)
│ ├── java/ # Client Java source files
│ └── resources/ # Client config files
├── build.gradle # Build configuration
├── gradle.properties # Mod version and dependency versions
└── docs/ # Design documents and references
Just create a new repo from this template and run /design-mod again with a different idea!