Skip to main content

Minecraft 1.21.1 and 26.2 with NeoForge

This step-by-step series explains how to create a Minecraft mod with NeoForge. The main examples target Minecraft 1.21.1, NeoForge 21.1, and Java 21. Each episode also has a dedicated section explaining the equivalent code and API changes for Minecraft 26.2, so you can follow the series with either version.

The episodes build on one another. If you are starting a new mod, follow them in order and keep the project from the previous episode as your starting point.

The complete companion projects are available on GitHub:

Series contents

EpisodeTopicsWritten tutorialVideo1.21.1 source26.2 source
1Basic project setup, Gradle, mod metadata, events, and running the gameBasic NeoForge SetupYouTubeGitHubGitHub
2Blocks, items, models, loot tables, recipes, and data generationA First Block and Data GenerationYouTubeGitHubGitHub
3Block entities, block states, data components, and persistent dataBlock Entities and Persistent StateYouTubeGitHubGitHub
4Optional integrations with Just Enough Items and The One ProbeIntegrating with JEI and The One ProbeYouTubeGitHubGitHub

What you will build

The series starts with a minimal mod that loads successfully. It then adds a custom block, generates its resources and data, gives it persistent on/off state, and finally integrates that block with JEI and The One Probe. Along the way, the tutorials explain why each Minecraft and NeoForge system is needed, not just which code to copy.

Choosing a Minecraft version

Use the Minecraft 1.21.1 instructions when you want the established NeoForge 21.1 ecosystem. Use the Minecraft 26.2 section at the end of each episode when you are targeting the newer release. Do not mix snippets from the two versions unless the tutorial explicitly says that their APIs are identical.

Before you begin

You should be comfortable reading basic Java, but no previous modding experience is required. Install a 64-bit Java 21 JDK and an IDE with Gradle support, such as IntelliJ IDEA. Episode 1 walks through the remaining project setup.

Useful starting points: