How to make Minecraft mods with AI in 2026
You can make a Minecraft mod with AI today, and many people do. The AI writes Java, JSON and Gradle files, and you build and run them. What decides whether it works is how well the AI knows the exact Minecraft version and loader you picked. Models learned from years of code written for other versions, so they mix names from different releases and sometimes invent a method that sounds right. The fix is a routine: pin the version in every prompt, give the AI your real code and errors, change one thing at a time, build after each change and run the game before you believe it.
This guide covers the four ways to do it, a full walkthrough from an empty folder to a published mod, prompts that work and prompts that don’t, the mistakes models make on each version era, and the rules Modrinth and CurseForge set for AI-made mods. It was checked on 19 and 20 November 2026 against Modrinth’s and CurseForge’s own pages (see Sources) and against Linen’s own how-tos and porting pages.
If you only read two sections, read what to do and what to avoid.
Why AI code breaks in mods
Section titled “Why AI code breaks in mods”Writing a mod is harder for an AI than writing a web page, for three reasons.
- Minecraft changes every release. Classes are renamed and moved, and whole systems change. Items stopped keeping data in NBT and moved to data components in 1.20.5. Since 26.1 the game ships with Mojang’s names and Fabric no longer supports Yarn. Most code online, and so most of what a model learned from, is older than that. See port a mod to 26.1.
- Loaders differ. Fabric, NeoForge and Forge register blocks, items and events in different ways, and a model asked for “a Minecraft mod” often mixes them in one file.
- Models name things that don’t exist. A method that sounds right and has the right shape can still be missing from your version. Only the compiler or the game’s own code can say.
None of this makes AI useless for modding. The AI needs the facts a human modder keeps in their head, and you have to check what it produces.
The four ways to make a mod with AI
Section titled “The four ways to make a mod with AI”1. A chat assistant (ChatGPT, Claude, Gemini, Copilot Chat)
Section titled “1. A chat assistant (ChatGPT, Claude, Gemini, Copilot Chat)”You describe what you want in a chat window, copy the code it writes into your project, build, and paste the errors back. Most of these have a free tier, and the only setup is the project itself.
Steps:
- Make a project that already builds. Use the project generator or your IDE’s template.
- Start the chat with the facts: Minecraft version, loader, loader version, mappings, Java version, mod id and
package. Copy them from
gradle.propertiesandbuild.gradle. - Ask for one small thing, such as one item.
- Paste the files it names into your project. Check the file paths, because chat answers often leave out where a file goes.
- Build. Paste the first error back with the file and line.
- Repeat.
Good for learning, for a single class, for explaining a crash report or a Gradle error and for generating JSON such as loot tables and recipes. The weak spot is that the assistant can’t see your project. It works from what you paste, so it forgets your other files, drifts back to older names and can’t run the build. You carry every error to it by hand, and you decide what to trust.
2. A coding agent in a terminal or editor (Claude Code, Copilot agent mode, Cursor-style editors)
Section titled “2. A coding agent in a terminal or editor (Claude Code, Copilot agent mode, Cursor-style editors)”An agent reads your project, edits files, runs commands such as ./gradlew build and reads the result, then fixes
what it broke. Claude Code runs in a terminal and in editor extensions. GitHub Copilot has an agent mode in VS Code,
and editors built around AI, such as Cursor, offer the same loop. Most need a paid plan or an API key for real use.
Steps:
- Open the project folder in the tool.
- Put the version facts in a file the tool reads at the start of every session. Claude Code reads a
CLAUDE.md, and other tools have an equivalent. Write the Minecraft version, loader, mappings, Java version and package there. - Ask for one change. Let it edit and run the build.
- Read the diff before accepting it. The agent can touch more files than you expected.
- Run the game yourself. An agent that gets a green build has not seen the game start.
This is the best general-purpose route for a mod with more than a few files, because the agent sees the whole project and fixes its own compile errors. It still knows Minecraft only from training data and from what it reads in your folder. It doesn’t know your loader and version unless you tell it, and it can’t start your game and look at it unless something gives it a way to.
3. No-code “AI mod generators”
Section titled “3. No-code “AI mod generators””Some websites and apps take a sentence such as “a sword that shoots fireballs” and return a mod jar or a project. They need no programming and no setup, and they suit a first experiment or a mod for a private server with friends.
What they usually can’t do:
- Target the newest version. Many support one or two versions only.
- Handle anything big. A new item or block works, but a feature that touches several systems tends to fail.
- Let you change the result. You get a jar, and when something needs a fix you have no project to open, unless the tool gives you the source.
- Show you why something fails, which also means you learn little.
If the tool hands you a source project, open it in an IDE, build it and read the code. A mod that is mostly generated output can’t be published publicly on Modrinth, see below.
4. Making mods with AI inside Linen
Section titled “4. Making mods with AI inside Linen”Linen is a desktop IDE for Minecraft mods (Windows, macOS and Linux). It is in private beta, and joining is free. Free has everything you need to make a mod that works, and Pro removes waiting. Claude inside Linen is free and never part of Pro. You pay Anthropic for your Claude usage under your own plan.
Linen doesn’t have its own model. If you have Claude Code, Anthropic’s coding agent, Linen runs it unmodified in a panel next to your code. You install Claude Code and sign in yourself, and Linen never sees your login. See set up AI.
What the panel adds over Claude Code in a plain terminal:
- Claude gets a brief for your mod each chat: its name, id, package, and each module’s loader, Minecraft version and mappings. You don’t have to paste them into every prompt.
- It can read Minecraft’s code from your own game jar, 400 lines at most at a time, with an off switch. Linen never bundles or uploads Minecraft’s code.
- It can check which versions have a method, so a call that exists in 1.21.1 and not in 26.3 gets caught.
- It can see Linen’s Problems view, run your game tests and build every version of your mod. It can also use the running game: take a picture of it, tell which block you are looking at, reload, and find what lags.
- What Claude proposes shows as a diff, and you accept or reject it. Steps that need permission show as buttons. Rewind puts back the files Claude changed.
/fixhands Claude the errors Linen shows now,/crashthe last crash, and/port <version>starts a port to another version. Nothing is sent until you type a command or press a button.- When Claude changes a file, a card lists the Java errors in it, with a button to ask Claude to fix them.
The editor, Crash Doctor, the debugger and every other Linen tool work without any AI account. The panel is optional, and “Use Claude in Linen” can be turned off in Settings. More on what leaves your computer is on How Linen uses AI.
Which way to pick
Section titled “Which way to pick”| You are | Start with |
|---|---|
| Curious and want a first item working today | A chat assistant, or a generator, with a project from the project generator |
| Building a mod you want to keep and grow | A coding agent, ideally inside an IDE that knows your version, such as Linen |
| Stuck on one error | The crash log analyzer first, then a chat assistant |
| New to Java | Any of them, plus How to make a Minecraft mod so you can read what the AI writes |
Linen is the better route when the mod is yours to keep. The AI works in a real project, gets the exact version without being told, and every change goes through the same build, Crash Doctor and debugger a human modder uses. A chat window or a generator can get you a first item faster, with less to install. If the first item is the whole goal, use those.
Make a mod with AI, start to finish
Section titled “Make a mod with AI, start to finish”This walkthrough uses Linen, because it covers every step in one place. Each step works the same way in another IDE.
1. Pick a loader and a Minecraft version
Section titled “1. Pick a loader and a Minecraft version”Choose the loader your players use and the Minecraft version they play. Fabric vs NeoForge vs Forge compares them. An older version such as 1.21.1 has more code online than 26.3, so models know it better. That also means older names show up in the answers, so you still have to say which version you mean.
Write the choice down, with the Java version it needs: Java 21 for Minecraft 1.20.5 to 1.21.11, and Java 25 for 26.1 and newer (Java versions). The project generator offers Fabric, NeoForge, Forge, Quilt, Legacy Fabric, Paper, Spigot, Bukkit and Purpur from 1.12.2 to 26.3.
2. Make the project
Section titled “2. Make the project”In Linen, choose New mod on Home, pick the loader and version, type the mod’s name and press Create. Linen finds or
downloads the Java the version needs and shows the first build as named steps. Without Linen, the
project generator runs in your browser and gives you a project that builds, with the
Gradle wrapper, the right Java and Gradle versions and your name, id and package filled in. Run ./gradlew build
once before you add anything, so you know the project builds without any AI code in it.
3. Set the AI up
Section titled “3. Set the AI up”In Linen, install Claude Code from Anthropic, open the Claude panel and sign in. Set up AI has the steps. In another tool, create the file that tells it your facts. A short one is enough:
This is a Minecraft Java mod.Minecraft 1.21.1, NeoForge 21.1, Mojang names, Java 21.Mod id: rubymod. Package: com.example.rubymod.Build with ./gradlew build. Never invent method names: if you are unsure a methodexists in this version, say so and look at the game's source instead.Put your own numbers in. Don’t copy these unless they match your project.
4. Write the first prompt
Section titled “4. Write the first prompt”Start small. One block or item, with the exact behaviour, in one message:
Add a block called ruby_block to this mod. It should drop itself when mined with aniron pickaxe, have a 16x16 placeholder texture, a blockstate, models for the blockand the item, a loot table and an English name. Follow how items and blocks areregistered in this project already. Change only what is needed, and tell me whichfiles you touched.The sentence about following the project’s own registration keeps the AI from importing a different style. The sentence about files gives you a list to review. Linen’s how-to for a new block lists every file a block needs, which makes a good checklist to compare against.
5. Build
Section titled “5. Build”Let the AI run ./gradlew build, or build in your IDE. In Linen, saving compiles, and Java errors appear as you
type. A green build means the code is valid Java against your version’s classes. It says nothing about whether the
game accepts it.
6. Run the game
Section titled “6. Run the game”Press Play in Linen, or run ./gradlew runClient. Find the new block in the creative inventory, place it, break it,
check the name and the texture. Many mistakes only show up here, such as a capital letter in an
id, an id registered twice
or a missing texture.
7. Fix the crash
Section titled “7. Fix the crash”If the game crashes, hand over the crash itself, not your guess at it. In Linen, Crash Doctor opens by itself with the
cause, the line and the fix, and /crash in the Claude panel sends Claude the last crash. Elsewhere, paste the first
Caused by: line and the lines under it, or paste the whole report into the crash log
analyzer. Fix common mixin and crash errors
explains how to read a report.
Ask the AI to explain the cause before it changes anything. If the explanation doesn’t match the report, the fix won’t either.
8. Iterate
Section titled “8. Iterate”Commit after every working step. Then ask for the next small thing, such as a recipe, a tool tier or a mob drop. Each prompt follows the same loop: state the goal, name the files, build, run, read the diff. Linen’s how-tos have tested example code for about a hundred common tasks, and giving the AI one as a starting point works better than letting it start from nothing.
9. Publish
Section titled “9. Publish”Build the jar with ./gradlew build and take it from build/libs/. Upload it to Modrinth or CurseForge yourself.
Read the AI rules below first, tick the disclosure if your project needs it, and use real
screenshots from the game. The how-to publish metadata covers the fields the
jar needs.
What to do
Section titled “What to do”- Pin the exact Minecraft version, loader, loader version, mappings and Java version in every prompt, or in the file the tool reads at the start. “NeoForge 21.1 for Minecraft 1.21.1, Mojang names” is a good line. “A Minecraft mod” isn’t.
- Give the AI your real code. Paste or attach the class you are changing and the one that registers things today, so the answer fits your mod and not a template.
- Give it the real errors. Copy the first error with its file and line, and skip the summary.
- Work in small steps. One item, one block or one change per prompt, with a build after each.
- Use version control. Commit when something works, so a bad AI edit is one
git restoreaway. - Check every API the AI names against your version. In your IDE, go to definition on the class or method. In Linen, the Java tools do this once the project is open. The how-tos show a working version.
- Run the game after every meaningful change. Starting the game and using the feature tells you more than a green build.
- Read the diff. Reject changes to files you didn’t ask about, and changes to build files you don’t understand.
- Ask it to say what it is unsure about. A model that says “I think this method exists in 1.21.1” has handed you the line to check.
- Learn enough Java to read the code. You are the one who has to fix it when the AI can’t.
- Keep a note of what the AI got wrong in your project, and add it to the instruction file. The same mistake then stops coming back.
What to avoid
Section titled “What to avoid”- Don’t paste credentials, tokens, signing keys or the contents of
.envfiles into a chat or an agent. Keep them out of the project folder, or in a file the tool can’t read. Publishing tokens for Modrinth and CurseForge belong in your environment variables, never in agradle.propertiesyou commit. - Don’t accept “it compiles” as proof. A mod that builds can still fail on start-up, crash when a block is placed, or do nothing.
- Don’t ask for a whole mod in one message. Big requests give big diffs you can’t review, and the errors pile up.
- Don’t let a model change Gradle, loader or Java versions to make an error go away. A newer plugin version that fixes one error often breaks the build elsewhere. Say that build files are off limits unless you ask.
- Don’t trust a method name because it looks right. Look it up.
- Don’t ask the AI to write mixins, access wideners or access transformers without the target class, method and descriptor from your version. Mixins fail more than anything else, see below.
- Don’t mix loaders. If the AI answers with
net.minecraftforgeimports in a NeoForge project, stop and ask again with the loader named. - Don’t use Minecraft’s own textures, sounds or decompiled code in a mod you publish. They belong to Mojang. Make your own textures and sounds, or use ones whose licence lets you ship them, and credit them.
- Don’t ship code the AI reproduced from another mod without checking that mod’s licence.
- Don’t publish a mod you haven’t played.
Mixins and access wideners
Section titled “Mixins and access wideners”Mixins change the game’s own classes while it loads, so the target has to match your exact version, down to the method descriptor. A model can’t know that from memory, and the names changed on 26.1. Typical failures are a target class that moved, a method with a different signature and an injection point that no longer exists. They show up when the game starts, as “@Mixin target was not found” or “Critical injection failure”.
When you need a mixin:
- Ask first whether an event, a callback or a loader API covers it. Often one does.
- Give the AI the target class and the method as they appear in your version. In Linen, Claude can read them from your own jar.
- Ask for the smallest mixin that does one thing, and a note saying why it is needed.
- Start the game right away and read the log.
Linen’s pages for this are mixin target not found, mixins on 26.1, the how-tos a simple mixin, a mixin accessor and debug a mixin, and access wideners and class tweakers for Fabric. On NeoForge and Forge the equivalent is an access transformer.
Prompts that work
Section titled “Prompts that work”A good prompt names the version, points at the code, asks for one change and says how to check it.
Minecraft 1.21.1, Fabric, Mojang names, Java 21. In ModItems.java I registerRUBY with Registry.register. Add a food item called ruby_apple that restores 4 hungerand gives Regeneration I for 5 seconds. Use the data component for food that exists in1.21.1. Don't change any other file except the English lang file and the item model.After the change, run ./gradlew build and show me the result.The game crashes when I place my block. These are the crash report's first lines:[paste the "Caused by" lines and the stack frames that mention com.example.rubymod]Explain the cause in two sentences first. Then show the smallest change that fixes it.Don't touch anything else../gradlew build fails with this error:[paste the error with its file and line]This is MyBlocks.java:[paste the file]Minecraft 26.3, NeoForge, Java 25. What does the error mean, and what is the fix?If a method may not exist in this version, say so instead of guessing.I'm porting this mod from 1.21.1 to 26.3 on NeoForge. List the classes and methods inthe attached files that were renamed, moved or removed between these versions. Foreach one, say how sure you are. Don't change code yet.The last one asks for a list before any edit, so you can check the list against the 26.2 to 26.3 notes and port a mod between versions.
Prompts that don’t work
Section titled “Prompts that don’t work”| Prompt | Why it fails | Better |
|---|---|---|
| “Make me a Minecraft mod with a dragon boss” | No version, no loader, too big to review, and it will mix loaders | One entity at a time on a named version, starting from the how-to for a custom mob |
| “It doesn’t work, fix it” | The AI has no error to read and guesses | Paste the first error with its file and line |
| “Add a mixin to make zombies faster” | No target and no version, and speed is an attribute, so a mixin is the wrong tool | Ask how to change the mob’s attributes in your version |
| “Update my mod to the latest version” | “Latest” is whatever the model learned about, which is older than the game | Name the version, such as 26.3, and ask for a list of changes first |
| “Use the newest NeoForge API” | The model’s idea of newest is old | Paste the loader version from gradle.properties |
| “Write the whole thing, I’ll test it later” | Hundreds of lines with several errors, and no way to tell which is which | One change, then build, then run |
Mistakes models make on each version era
Section titled “Mistakes models make on each version era”These come up most, each with the page that explains it.
| Where the model goes wrong | What is true | Read |
|---|---|---|
Uses Yarn names such as CreeperEntity on a new project |
Since 26.1 the game ships with Mojang’s names (Creeper) and Fabric no longer supports Yarn. Fabric 1.21.11 and older can use either, so say which |
Yarn to Mojang names, migrateMappings |
| Stores item data in NBT | From 1.20.5 items keep data in data components | Item data components |
Registers a block or item without setId |
From 1.21.2, block and item properties need their registry key set with setId before the object is created. The 1.21.1 how-tos don’t use it and the 26.3 how-tos do |
A new block, a new item |
| Uses Forge code in a NeoForge project | NeoForge renamed packages, the mods file and the event annotations. META-INF/mods.toml became neoforge.mods.toml, @Mod.EventBusSubscriber became @EventBusSubscriber, Bus.FORGE became Bus.GAME, and the game bus is NeoForge.EVENT_BUS. Registration uses DeferredRegister.createBlocks and DeferredBlock, where Forge 1.20.1 uses ForgeRegistries and RegistryObject |
Forge to NeoForge, Missing mods.toml |
Writes net.fabricmc imports in a NeoForge mod, or the other way round |
The loaders share Minecraft’s classes and little else | Fabric vs NeoForge vs Forge |
| Sends a packet with the old networking | NeoForge payloads register in RegisterPayloadHandlersEvent with a StreamCodec |
Failed to decode packet |
| Names the wrong Java or Gradle | Java 21 up to 1.21.11 and Java 25 from 26.1, with Gradle 9.1.0 or newer on 26.1 | Wrong Java version, Gradle too old |
| Suggests mods or dependencies built for an older version | Mods built for 1.21.11 and older don’t work on 26.1, even as compile-only dependencies | Old mods on 26.1 |
| Calls a class or method from an older version | The compiler says “cannot find symbol” or the game says NoSuchMethodError |
Class not found or no such method |
| Writes a mixin target from memory | Targets and descriptors change between versions | Mixin target not found, Mixins on 26.1 |
| Moves between versions by editing version numbers | A real port also changes code | Update a mod to a new Minecraft version, port a mod between versions |
If you build for 26.3, give the AI the notes for 26.1 to 26.2 and 26.2 to 26.3, since a model that learned from older code won’t know what changed.
Modrinth’s AI rules
Section titled “Modrinth’s AI rules”Modrinth announced its AI rules on 13 August 2026. A 45-day grace period ended on 27 September 2026.
- A project that is entirely or mostly made of generative AI output can’t be published publicly. AI-assisted projects are allowed when the human creator contributed in a primary and significant way, and they have to disclose it.
- AI-generated images can’t be used as an icon, a banner or a gallery image, or in the description. Screenshots must show the real game.
- A project must enable the “Contains AI-generated content” disclosure when a substantial amount of its code is AI output, any of its assets are mainly AI output, its design or functionality relies on generative AI, or its page or publishing process does. Separate options say whether AI was used for code, assets, text or functionality.
- Mob AI such as pathfinding, and scripts like data generation, don’t count. Modrinth’s rule of thumb is whether a person in the AI tool’s place would expect to be credited.
- Modrinth’s terms of use forbid using content on the site to train AI models.
CurseForge’s AI rules
Section titled “CurseForge’s AI rules”CurseForge’s moderation policies have one AI rule. A showcase image that was generated, edited or enhanced with AI and could misrepresent what the mod contains needs a clear, visible disclaimer, on the image or in the description. The page says nothing about AI-written code or text.
Rules change, so read both pages again before you publish.
Questions
Section titled “Questions”Is it allowed to make a mod with AI?
Section titled “Is it allowed to make a mod with AI?”Yes. Modding tools and loaders don’t forbid it. The platforms have their own rules, summarised above. On Modrinth you must disclose substantial AI code and assets, and a mod made mostly of AI output can’t be public.
Can AI make a whole mod?
Section titled “Can AI make a whole mod?”For a small mod with a few items, blocks and recipes, an agent can get most of the way, and you finish by testing and fixing. For a bigger mod, it can write much of the code, but someone has to design it, test it and fix the places where the AI got a version wrong. A mod that is mostly AI output can’t be public on Modrinth.
Which AI is best for Minecraft mods?
Section titled “Which AI is best for Minecraft mods?”No model knows your project’s version from memory, so the tool matters about as much as the model. A coding agent that reads your files, runs the build and sees the errors will do better than a chat window with the same model. Whichever you pick, test it on one small change in your own version before you rely on it.
Does it cost money?
Section titled “Does it cost money?”Chat assistants have free tiers, with limits. Coding agents mostly need a paid plan or an API key. Linen itself has a free tier that includes the Claude panel. Anthropic bills the Claude usage under your own plan, and Linen never marks it up or resells it. Linen Pro doesn’t include Claude. See pricing.
Can kids use AI to make mods?
Section titled “Can kids use AI to make mods?”Most AI tools have age limits in their terms, so read them, and ask a parent or teacher before an account is made. If a child uses an agent that can run commands, set it to ask before every step. A visual tool such as MCreator can be a gentler start, and How to make a Minecraft mod shows the code route. Keep personal details out of any AI tool.
Are Bedrock add-ons the same as Java mods?
Section titled “Are Bedrock add-ons the same as Java mods?”No. Bedrock Edition add-ons are made of JSON and JavaScript files, and Java mods are Java code built with Gradle against a loader. An AI that answers a Java question with an add-on manifest has the wrong edition. Linen is for Minecraft: Java Edition mods and server plugins, and so is this guide.
Can AI help with server plugins?
Section titled “Can AI help with server plugins?”Yes, the same way. Say the server (Paper, Spigot, Bukkit or Purpur) and the Minecraft version in every prompt. See make a Paper plugin.
Do I still need to learn Java?
Section titled “Do I still need to learn Java?”You can start without it. You will need it to read a diff, notice a bad change and fix what the AI can’t. How to make a Minecraft mod walks through a first mod with the code explained.
What is the best IDE for AI-assisted modding?
Section titled “What is the best IDE for AI-assisted modding?”One that runs the build and the game, shows errors as you type and gives the AI the right version. See the best IDE for Minecraft modding for the comparison, and Linen vs MinecraftDev.
Try it in Linen
Section titled “Try it in Linen”Linen is in private beta, and joining is free. You get Linen Pro free for a month, and a short review at the end is welcome. Linen Free has no time limit, and it works with every Minecraft version from 1.12.2 to 26.x. See pricing for what Pro adds, features for the whole list, and set up AI for the Claude panel. If you haven’t picked a loader yet, start with the project generator.