MultiLoader 1.21+ · Part 1

Getting Started with MultiLoader 1.21+

BEGINNER MULTILOADER 1.21-1.21.1 12 min read · May 10, 2026
MultiLoader 1.21+ · 28 parts
1 Getting Started with MultiLoader 1.21+ 2 Setting Up RegistrationUtils 3 Creating Items (MultiLoader 1.21+) 4 Creating Blocks (MultiLoader 1.21+) 5 Data Generation: Block & Item Models (MultiLoader 1.21+) 6 Data Generation: Block Loot Tables (MultiLoader 1.21+) 7 Data Generation: Crafting Recipes (MultiLoader 1.21+) 8 Data Generation: Block & Item Tags (MultiLoader 1.21+) 9 Custom Food Items (MultiLoader 1.21+) 10 Custom Tools (MultiLoader 1.21+) 11 Custom Armour (MultiLoader 1.21+) 12 Block Entities (MultiLoader 1.21+) 13 Config Files (MultiLoader 1.21+) 14 Custom Sounds (MultiLoader 1.21+) 15 Events and Listeners (MultiLoader 1.21+) 16 Networking and Custom Packets (MultiLoader 1.21+) 17 Data Generation: Advancements (MultiLoader 1.21+) 18 Data Generation: Language Files (MultiLoader 1.21+) 19 Custom Entities (MultiLoader 1.21+) 20 Ore Generation (MultiLoader 1.21+) 21 Introduction to Mixins (MultiLoader 1.21+) 22 Custom Particles (MultiLoader 1.21+) 23 Menus & Screens (MultiLoader 1.21+) 24 Key Bindings (MultiLoader 1.21+) 25 Custom Potion Effects (MultiLoader 1.21+) 26 Custom Enchantments (MultiLoader 1.21+) 27 Custom Commands (MultiLoader 1.21+) 28 Custom Biomes (MultiLoader 1.21+)

This tutorial walks you through setting up a MultiLoader development environment from scratch. By the end you will have a working Gradle project that compiles and runs on both Fabric and NeoForge from a single shared codebase.

Installing JDK 21

Minecraft 1.21+ requires Java 21. Download and install the latest JDK 21 release from Oracle's JDK 21 download page. After installation, verify it is available on your PATH:

shell
java -version
# Should print something like:
# java version "21.x.x" ...
TIP
On Windows you may need to restart your terminal (or the system) after installing the JDK for the JAVA_HOME environment variable to take effect.

Getting the Template

The easiest way to start a MultiLoader project is with the MultiLoader-Template maintained by jaredlll08. Click Use this template on GitHub to generate your own repository, or clone it directly:

shell
git clone https://github.com/jaredlll08/MultiLoader-Template.git MyMod
cd MyMod

The template contains three Gradle subprojects:

  • common: shared code that compiles against both loaders
  • fabric: Fabric-specific entry points and dependencies
  • neoforge: NeoForge-specific entry points and dependencies

Configuring the Project

Open gradle.properties in the root directory and update the mod identity fields:

properties
mod_name=ExampleMod
mod_author=YourName
mod_id=examplemod
maven_group=com.example.examplemod

Also check settings.gradle to confirm the project name matches your mod:

groovy
rootProject.name = 'ExampleMod'
WARNING
The mod_id must be all lowercase with no spaces or special characters. It is used as the namespace for all your registry names and resource paths, so choose it carefully.

Setting Up IntelliJ IDEA

Open IntelliJ IDEA Community Edition and choose Open, then select the root folder of your cloned project (the one containing settings.gradle). IntelliJ will detect the Gradle project and begin importing.

Once imported, set the Gradle JVM to Java 21:

  1. Open File → Settings → Build, Execution, Deployment → Build Tools → Gradle
  2. Under Gradle JVM, select your JDK 21 installation
  3. Click OK, then click the Gradle refresh button to re-sync

Also set the Project SDK to Java 21 under File → Project Structure → Project → SDK.

TIP
If you see "SDK not configured" errors, make sure you add the JDK 21 path under File → Project Structure → SDKs first, then select it in the Project settings.

Running the Project

After the Gradle sync completes you will see run configurations appear in the top-right dropdown of IntelliJ. There will be separate configurations for Fabric and NeoForge:

  • Fabric Client / Fabric Server
  • NeoForge Client / NeoForge Server

Run Fabric Client first to confirm the Fabric setup works, then run NeoForge Client. Both should launch a vanilla Minecraft instance with your (empty) mod loaded. If you see the game start without errors, your environment is ready.

Before moving on, rename the package structure in the fabric and neoforge subprojects to match the group you set in gradle.properties, and update the Constants class in the common project with your MOD_ID value.

NOTE
If you do not plan to use mixins immediately, you can safely delete the mixin packages and their accompanying .mixins.json config files in each subproject to keep things tidy.
I suggest you keep them in, as later in this series we will be covering the use of mixins.

Building Your Mod

To build your mod and produce the jars for release, all you need to do is run the build task from the gradle menu. This will build three jars, a common, neoforge and fabric jar for your mod. These will be located in each of the subproject's build/libs directories. For publication of your mod, you do not need to use the common jar, only the neoforge/fabric jars. The common jar is practical in other cases (i.e., if you are building an API), but for the purpose of this tutorial series we will not be covering this.

You can find the source for this tutorial here:

View Source on GitHub
NEXT IN SERIES

Setting Up RegistrationUtils

Add the RegistrationUtils Gradle plugin to your multiloader project, configure the fabric/neoforge/common project blocks, and get registration helpers ready for blocks and items.

Continue →