MOD / KID / 01
Minecraft coding
MakeCode blocks before Java.
Open the syllabusUnited States · Ages 13 to 18 · Minecraft: Java Edition
Minecraft: Java Edition is written in Java, and so is almost every mod for it. That makes modding one of the most motivating ways for a teenager to learn a real, professional programming language: the reward for getting the code right is a new item, block or creature in a game they already love. This guide covers the decisions that trip up beginners before they write a line, Fabric or Forge and which Java version, then walks through a first custom item using the code patterns from Fabric’s own documentation, and ends with what Mojang’s rules say about sharing a mod.
Live teaching since 2020 · 10,000+ students · Modding taught inside our Java course
In short
To learn to code Minecraft mods, learn basic Java, install the JDK your Minecraft version needs (Fabric says JDK 25 for Minecraft 26.1), generate a project with Fabric’s Template Mod Generator or Forge’s MDK, open it in IntelliJ IDEA, and register a first item. Mods are for Java Edition only. Modern Age Coders teaches modding inside its live Java course for ages 13 to 18.
Learn it with a teacher
The Java course is where modding lives; the other two suit a different starting point.

MOD / 01
Teens 13 to 18: core Java, a 2D game, then Minecraft modding.
Open the syllabus →
MOD / 02
For teens who would rather build whole games than mods.
Open the syllabus →
MOD / 03
Younger siblings, 7 to 12: block coding first.
Open the syllabus →The first decision
A mod does not run on its own. It needs a mod loader, a piece of software that starts Minecraft with mods attached. The two long-standing choices are Fabric and Forge, and a mod written for one does not run on the other.
| Point | Fabric | Forge |
|---|---|---|
| How it describes itself | A modular modding toolchain for Minecraft: Java Edition 1.14 and above, including snapshots | A mod loader with a Mod Developer Kit (MDK) and its own documentation site |
| Newest version on its pages | Developer docs for Minecraft 26.2 | Downloads for MC 26.3, Forge 66.0.13, dated October 16, 2026 |
| Java named in its setup docs | JDK 25 for Minecraft 26.1 | Java 21 JDK, in docs whose version menu tops out at 1.21.x |
| Editors it names | IntelliJ IDEA (recommended) or Visual Studio Code | Eclipse and IntelliJ IDEA, plus run configurations for Visual Studio Code |
| How a project starts | The Template Mod Generator, or cloning the example mod | Download and extract the MDK |
| The file that describes the mod | fabric.mod.json | mods.toml, in META-INF |
| Code names | Names from the unobfuscated game | Names as shown in its 1.21.x docs |
Our choice for a first mod is Fabric, for one practical reason: on the day we checked, its developer documentation covered a current 26.x version (26.2), while Forge’s documentation site stopped at 1.21.x even though Forge itself downloads for 26.3. A beginner should not have to translate between versions.
The Java skills are the same either way. Classes, methods, registration and events carry over, and teens who later join a Forge project learn its patterns quickly.
Families who last looked at Minecraft a few years ago will notice something new: Forge’s download page lists Minecraft 26.1, 26.2 and 26.3 above 1.21.11. Mods are built for an exact version, so the version number is the first thing to check.
A mod for one version usually will not load on another. Mojang’s EULA says plainly that game updates might not work well with mods, and suggests running an older version when that happens.
Sources, read 17 October 2026: Fabric Wiki, Fabric developer docs, Forge documentation and Forge downloads. We are not connected with Mojang, Microsoft, Fabric or Forge.
The second decision
A classic failed first setup comes down to one mismatch: the Java Development Kit on the computer is older than the Minecraft version needs. The modding projects publish the rule. Fabric’s current setup page puts it in one line: To develop mods for Minecraft 26.1, you will need JDK 25.
| Minecraft version | Java needed | Where it is stated |
|---|---|---|
| 26.1 and the 26.2 docs | JDK 25 | Fabric developer docs, setting up |
| 1.20.5 and later 1.x | Java 21 or newer | Fabric wiki, setup tutorial |
| 1.18 to 1.20.4 | Java 17 or newer | Fabric wiki, setup tutorial |
| 1.17 | Java 16 or newer | Fabric wiki, setup tutorial |
Write three things on a sticky note before starting: the Minecraft version you want to mod, the loader, and the Java version the table above gives for it. Every tutorial you follow should match all three.
If a tutorial uses a different Minecraft version, its code may not compile. That is not your fault and not a bug in your code; it is the wrong tutorial for your setup.
Forge’s documentation says it recommends and officially supports Eclipse Temurin, and the Fabric wiki points to the Temurin releases page for installers too.
Fabric warns that building from a terminal can cause problems if your default Java does not match what the project expects, and suggests an IDE that lets you pick the Java version. For a beginner, that is the simpler route.
Step by step
These are the steps from Fabric’s developer documentation, in the order a beginner meets them, with the warnings that save the most time.
School and family laptops often keep the Documents folder inside a cloud sync service. Build tools write thousands of small files, and Fabric’s tip exists because syncing gets in the way of that.
A plain folder near the top of the drive, with no spaces in its name, avoids a whole family of confusing errors.
The generator creates two entrypoints by default, according to Fabric: a main one, in a class that implements ModInitializer, for code shared by client and server, and a client one, implementing ClientModInitializer, for client-only code.
The main entrypoint runs when Minecraft is ready to load mods. Fabric’s own example logs Hello Fabric world! there; ours logs that the ruby shard was registered.
Your first mod
A new item is the classic first mod because it touches every part of modding: Java code to register it, and JSON files to name it and give it a look. Fabric’s docs put it simply: everything in Minecraft is stored in registries, and items are no exception.
// ModItems.java (ours: Fabric docs pattern, MC 26.2)
public class ModItems {
public static Item register(
ResourceKey<Item> key,
Function<Item.Properties, Item> factory,
Item.Properties settings) {
Item item = factory.apply(settings.setId(key));
Registry.register(BuiltInRegistries.ITEM, key, item);
return item;
}
public static final ResourceKey<Item> RUBY_KEY =
ResourceKey.create(Registries.ITEM,
ExampleMod.id("ruby_shard"));
// stacks of 16 instead of the usual 64
public static final Item RUBY_SHARD = register(
RUBY_KEY, Item::new,
new Item.Properties().stacksTo(16));
public static void initialize() {
CreativeModeTabEvents
.modifyOutputEvent(CreativeModeTabs.INGREDIENTS)
.register(tab -> tab.accept(RUBY_SHARD));
}
}Written with the classes and methods Fabric’s 26.2 documentation uses: ResourceKey, Item.Properties with setId, Registry.register and CreativeModeTabEvents. Imports are left out to keep it short; your editor offers to add them. Fabric notes that a damageable item always stacks to 1, so stacksTo only works on items like this one.
// ExampleMod.java: the main entrypoint (ours)
public class ExampleMod implements ModInitializer {
public static final String MOD_ID = "example-mod";
public static final Logger LOGGER =
LoggerFactory.getLogger(MOD_ID);
@Override
public void onInitialize() {
ModItems.initialize(); // loads the class
LOGGER.info("Ruby shard registered");
}
public static Identifier id(String path) {
return Identifier.fromNamespaceAndPath(MOD_ID, path);
}
}Fabric explains why initialize() can be empty and still matter: calling any method on a class makes Java load it, which runs its static fields, and that is where the item is registered.
// assets/example-mod/lang/en_us.json
{ "item.example-mod.ruby_shard": "Ruby Shard" }
// assets/example-mod/models/item/ruby_shard.json
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "example-mod:item/ruby_shard"
}
}
// assets/example-mod/items/ruby_shard.json
{
"model": {
"type": "minecraft:model",
"model": "example-mod:item/ruby_shard"
}
}Three small JSON files, each in its own folder under src/main/resources. The texture is a 16x16 PNG named ruby_shard.png in assets/example-mod/textures/item. Replace example-mod with your own mod id everywhere.
Notice the split. Java says that a ruby shard exists and how it behaves; the JSON files say what it is called and how it looks. Minecraft itself is built this way, which is why so much of modding is editing data files rather than writing code.
That idea, separating behavior from description, is one professional developers use everywhere, from websites to phone apps.
A 16 x 16 texture is 256 pixels, small enough to draw by hand in any pixel editor in a few minutes.
With stacksTo(16), carrying 64 shards takes 64 / 16 = 4 inventory slots, where an ordinary item that stacks to 64 needs one. Changing that single number is a good first experiment: build, launch, and count the slots. After editing these files, Fabric says you can restart the game, or build the mod and press F3+T, to apply the changes.
Sharing a mod
A teen whose first mod works will want to share it with friends. Mojang’s EULA and usage guidelines are friendly to that, with a few firm limits worth reading together.
| Question | What Mojang says |
|---|---|
| Can I mod the game? | If you’ve bought Minecraft: Java Edition, you may play around with it and modify it |
| Who owns my mod? | Any Mods you create for Minecraft: Java Edition from scratch belong to you |
| Can I sell it? | Not for money: you can do what you want with your mods as long as you don’t sell them for money or try to make money from them |
| Can I share it? | Yes, if you distribute the mod only and not a modded version of Minecraft |
| Any banned kinds of mod? | No play-to-earn function that pays out real-world or cash-out currency |
| What if an update breaks it? | Mojang does not take responsibility; it suggests running an older version |
The EULA asks minors who find the terms hard to understand to have a parent or legal guardian explain them. Reading the mods paragraph together takes five minutes and covers what a teen needs.
Installing other people’s mods is a separate question from writing your own. Fabric’s documentation mentions CurseForge and Modrinth as mod hosting sites; agree as a family which sources are allowed.
Build it with ./gradlew build on a Mac or Linux, or ./gradlew.bat build on Windows. The JAR files appear in build/libs, and Fabric says to use the one with the shortest name outside development.
Share the JAR, never a copy of Minecraft itself. That one rule keeps a teen’s mod inside what Mojang allows.
Sources, read 17 October 2026: the Minecraft EULA, the Minecraft Usage Guidelines and Fabric’s Building a Mod. Quoted lines are shortened; read the full terms before publishing.
A first term
Our plan for a teen who knows Minecraft well but has not written Java before. The plan moves faster through the first four rows for teens with some Python or JavaScript.
| Sessions | What gets built | The Java idea |
|---|---|---|
| 1 to 2 | Small console programs: a dice roller, a score keeper | Variables, types, if and loops |
| 3 to 4 | A tiny inventory written as classes | Classes, objects, methods, static |
| 5 | JDK, IntelliJ IDEA and the Fabric template running | Projects, packages, Gradle |
| 6 to 7 | The ruby shard: registry, name, texture | Registration, data files |
| 8 | A custom block that drops the shard | Inheritance and properties |
| 9 | A recipe and a creative tab | Events and data-driven design |
| 10 | Build the JAR, test on a dedicated server, explain the code | Testing, client and server sides |
Two sessions of plain Java make the modding code readable instead of magic. Skipping them makes the modding code far harder to follow.
Forge’s docs say to always test a mod in a dedicated server environment, including client-only mods. It is good advice for any loader.
Java is also the language of our AP Computer Science A classes, and a common one for Android apps and server software.
Younger players start with blocks instead: see our Minecraft coding classes for kids. For the language itself, Java classes for teens and AP Computer Science A classes go further, and Minecraft vs Roblox compares the two game worlds.
From player to modder
Where a teen who searches for modding might be today.
| Stage | What it looks like |
|---|---|
| 1. Mod user | Installs mods and knows which ones they like |
| 2. Tinkerer | Edits data packs, configs or textures |
| 3. First modder | Registers items and blocks from a tutorial |
| 4. Mod author | Designs a feature, writes the Java, and ships a JAR |
Hours of playing are not wasted. A teen who can describe why a mod is fun is already thinking like a designer.
Stage 3 needs real Java. A teacher makes the difference between copying a tutorial and understanding it.
Match your versions first: Minecraft, loader, Java. A mismatch is behind a lot of setup errors.
Start with one item. A mod that adds one thing and works beats a mod that adds fifty and crashes.
The catalogue
Taught live, the same teacher each week, as part of a batch or one to one.
MOD / KID / 01
MakeCode blocks before Java.
Open the syllabusMOD / KID / 02
Logic and games in blocks.
Open the syllabusMOD / KID / 03
A first typed language.
Open the syllabusMOD / TEN / 01
Core Java to Minecraft mods.
Open the syllabusMOD / TEN / 02
Projects in a second language.
Open the syllabusMOD / TEN / 03
Speed, memory and games.
Open the syllabusMOD / PRO / 01
Unity and C#.
Open the syllabusMOD / PRO / 02
Engines at a professional pace.
Open the syllabusMOD / PRO / 03
Build and present under time.
Open the syllabusHow lessons run
Weekdays or weekends, flexible: choose your batch, or for a very personalised plan choose 1-on-1 at your convenience, weekend mornings or weekdays.
Weekdays
Evening batches that work across US time zones.
Weekends
Weekend morning batches for longer build sessions.
1-on-1
Private, at your convenience.
JDK, editor and template in a live class.
The plan bends toward what you want to add.
The same language as our AP CS A classes.
The same person all term.
Fully online, any state.
Fifteen to twenty teens, or one to one.
Student work
Built by teenagers who learned to code with us. More are on the student labs page.

AI and ML
An AI nutrition coach that reads what you eat and works you toward a target.

AI and ML
A chatbot that answers mathematics and programming questions, built and deployed by a student.

AI and ML
An assistant that helps a young person recognise unsafe situations online.

Web app
A weather forecasting site with live conditions for any location.
Fees
Fabric, Forge and the JDK are free, and Java Edition is the only purchase modding needs. Our teaching is paid month by month in US dollars, with nothing to sign for the year and the option to stop after any month.
Group batch
USD 100
a month, billed in US dollars
What families say
Google reviews from parents, quoted without edits.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
Questions from teens and parents
Java. Minecraft: Java Edition is written in Java, and Fabric and Forge mods are Java projects built with Gradle.
Learn basic Java first: variables, loops, classes and methods. Then install the JDK your Minecraft version needs, generate a Fabric or Forge project, and register a first item.
Both work and the Java skills carry over. We start beginners on Fabric because its developer docs covered a current 26.x version (26.2) when we checked, while Forge's docs stopped at 1.21.x.
It depends on the Minecraft version. Fabric's docs say JDK 25 for Minecraft 26.1, and its wiki says Java 21 or newer since 1.20.5 and Java 17 or newer since 1.18.
No. Fabric and Forge are for Minecraft: Java Edition, and the EULA's mod permission is written for people who bought Java Edition.
Yes, within Mojang's rules. The EULA says mods you create from scratch belong to you, as long as you don't sell them for money, and you may share the mod but not a modded version of the game.
We teach Java modding from about 13, once a student can type and reason through Java classes. Younger children do well with block-based Minecraft coding first.
Fabric recommends IntelliJ IDEA, with Visual Studio Code as an alternative. Forge supports Eclipse and IntelliJ IDEA and provides run configurations for Visual Studio Code.
Check versions first: the mod, the loader and Minecraft must all be the same version, and the JDK must be the one that version needs.
Weekdays or weekends, flexible: choose your batch, or for a very personalised plan choose 1-on-1 at your convenience, weekend mornings or weekdays.
The first lesson is free. Regular classes are billed monthly, and the fees section of this page gives the amount in US dollars.
Elsewhere on this site
More for US teens who like to build.
Block coding for under-13s.
The language behind every mod.
Java, the College Board way.
Which game teaches more coding.
State guides, ages and subjects.
What a live lesson looks like.
Python games kids can code: a guessing game, then pygame, step by step.
MakeCode Arcade help: jumping, gravity, tilemap levels and lost projects.
Make a Roblox game step by step: devices, three Luau scripts, and safe publishing.
Start here
Tell us which Minecraft version your teen plays and the first thing they would like to add. The teacher checks the Java and loader versions for that before the lesson.
If you would like to see the method first, how we teach walks through a lesson, and the Java syllabus is on our courses page.
WhatsApp us · +91 91233 66161 · connect@modernagecoders.com
Every lesson is live over video, taught by our team in India, so teens anywhere in the US join from home. A WhatsApp message is the quickest way to ask us something.
A priority demo is a full class of about 45 to 60 minutes. After the class the mentor sends a written skill report and a personal learning roadmap on WhatsApp. If you enrol, the demo fee is adjusted against your first month's fee. Share your demo Order ID with us on WhatsApp and we take it off.
Book a priority demo