π§± Minecraft AI Builder Mod (Fabric 1.21.1)
A Fabric client-side mod that lets you construct Minecraft structures using natural language, powered by Claude AI.
Describe it. Preview it. Approve it. Build it.
β¨ Features
- π€ AI-Driven Building β Simply describe your structure and Claude generates the build plan
- β‘ High-Speed Placement β 50ms delay per block (~20 blocks/sec)
- π¨ Live Visual Preview β Green highlights show exactly what will change
- β Approve or Reject β Review before committing permanently
- π« No Server Rate Limits β Executes as your player client
π¦ Requirements
- Minecraft 1.21.1
- Fabric Loader
- Fabric API
- Java 21+
- Claude API key (from anthropic.com)
π Installation
1οΈβ£ Build the Mod
cd fabric-mod
.\gradlew.bat build
2οΈβ£ Install the JAR
copy build\libs\blockdiff-1.0.0.jar $env:APPDATA\.minecraft\mods\
3οΈβ£ Launch Minecraft
Start Minecraft 1.21.1 with Fabric Loader enabled.
π Usage Guide
1οΈβ£ Configure Claude (One-Time Setup)
/diff claude-setup sk-ant-api03-YOUR-KEY-HERE
2οΈβ£ Define Your Build Region
Stand at the first corner:
/diff pos1
Move to the opposite corner:
/diff pos2
3οΈβ£ Generate & Execute a Build
Request a structure:
/diff build a medieval stone tower with battlements
β¨ A green preview will appear showing planned changes.
Execute the temporary build:
/diff build-execute
β‘ Blocks place instantly and highlights update.
Finalize or undo:
/diff build-keep # Make permanent
/diff build-reject # Undo all changes
4οΈβ£ Iterate Within the Same Region
/diff build add a flag on top
/diff build-execute
/diff build-keep
π Command Reference
Setup
/diff claude-setup <api-key>β Configure Claude API (one time)
Region Selection
/diff pos1β Set first corner/diff pos2β Set second corner
AI Building
/diff build <description>β Generate preview/diff build-executeβ Place blocks (temporary)/diff build-keepβ Commit permanently/diff build-rejectβ Undo changes/diff build-cancelβ Cancel pending build
Diff & Highlight Tools (Optional)
/diff load <file>β Load diff file manually/diff opacity <0-100>β Adjust highlight transparency/diff toggleβ Show/hide highlights/diff clearβ Clear all highlights/diff infoβ Show current status
π Example Workflows
Quick Cube
/diff pos1
/diff pos2
/diff build a 5x5 stone cube
/diff build-execute
/diff build-keep
Tower Build
/diff pos1
/diff pos2
/diff build a tall tower with stone base and wooden top
/diff build-execute
/diff build-keep
Iterative House Construction
/diff pos1
/diff pos2
/diff build a house foundation
/diff build-execute
/diff build-keep
/diff build add walls to the house
/diff build-execute
/diff build-keep
/diff build add a roof
/diff build-execute
/diff build-keep
βοΈ How It Works
- You describe your structure in natural language
- The mod sends your prompt + region bounds to Claude API
- Claude generates a structured block placement plan
- The mod renders a green preview client-side
- You execute the build (using
/setblockcommands) - You keep or reject the result
π§ͺ Troubleshooting
β βClaude API not configuredβ
Run:
/diff claude-setup <your-key>
β βNo region definedβ
Set both corners:
/diff pos1
/diff pos2
β Out of memory
Reduce the selected region or build in smaller sections.
β Too many requests
Wait briefly and retry (API rate limiting).
β Mod fails to load
- Ensure Java 21+ is installed
- Confirm Fabric API is in your mods folder
- Verify Minecraft version is 1.21.1
π Performance
Placement Speed
- 50ms per block
- 100 blocks β 5 seconds
- 1000 blocks β 50 seconds
Highlights
- Green = Added blocks
- Rendered client-side using GL11
- Adjustable transparency
π Building From Source
cd fabric-mod
# Set Java 21
$env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-21.0.10.7-hotspot"
# Clean & build
.\gradlew.bat clean build
Output:
build\libs\blockdiff-1.0.0.jar
π License
MIT
π Credits
- Fabric API
- Claude AI by Anthropic
- Gson (JSON parsing)
Built With
- claude
- java
- minecraft
Log in or sign up for Devpost to join the conversation.