Getting started: install Modsmith and create your first Minecraft mod

This guide takes you from a fresh install to a Fabric, NeoForge or Forge mod running in Minecraft. It takes about ten minutes, most of it the first Gradle build downloading Minecraft.

Before you start

1. Install Modsmith

Download the installer for Windows, or the AppImage or .deb for Linux, from the download page and install it. The download page covers the Windows SmartScreen prompt and the Linux commands.

2. Check Java on first launch

The welcome screen shows a Getting started checklist:

3. Create a mod project

Press New mod on the welcome screen. The wizard has four steps: Template, Details, Configure and Create.

The Template step of the New mod wizard with the Loader, Minecraft version and Start from choices
The Template step of the New mod wizard.

Template

  1. Choose the Loader: Fabric, NeoForge or Forge.
  2. Choose the Minecraft version. The note under the list says how well the version is tested: 1.21.1 is "Tested by hand with every starter"; other versions "Build and launch in automated checks".
  3. To build the same mod for other loaders or Minecraft versions as well, pick each one under More targets and press Add target. Each target gets its own Gradle subproject, and a common folder holds the code and assets they share. You can skip this for a first mod and add targets later with More actions > Add a target….
  4. Under Start from, choose Empty mod, or Content mod for an example item, block, command, config screen and data generation (1.21.1 only). Press Next.

Details

  1. Enter a Project name, for example Gem Tools.
  2. Under Location, press Browse… and pick a parent folder. The project gets its own folder inside it.
  3. Open Identifiers to check the Mod ID (lowercase letters, digits and underscores; it becomes your resource namespace) and the Java package. Both are filled in from the name.
  4. More options has the author, description, license (MIT by default), whether the mod runs on the client, the server or both, and Initialize a Git repository (on by default). Press Next.

Configure

  1. Under Starter content, tick what you want: Example item, Example block, Command, Configuration, Data generation, the Runtime development bridge, and Client and dedicated-server test profiles. Keep the bridge and the test profiles: the rest of this guide uses them.
  2. Under Dependencies, you can add other mods your mod builds against. Fabric API is always included for Fabric projects. You can skip this for a first mod.
  3. If the step says no suitable JDK is installed, press Download JDK and wait for it to finish. Press Next.

Create

  1. Review the summary. Leave Run the first Gradle build now ticked: it downloads Minecraft and the toolchain, which takes about 1 to 3 minutes.
  2. Press Create project and watch the progress and log.
  3. When it finishes, press Open and launch client.

If the build fails, the files and logs created so far stay in the project folder under .modsmith/logs. Back to review returns to the summary. See Troubleshooting.

4. Launch Minecraft with your mod

Open and launch client opens the project and starts the Test Client run configuration. If Modsmith asks whether to trust the project, choose Yes: building and launching run the project's Gradle scripts, and Modsmith never runs them for a project you have not trusted.

The toolbar shows Building, then Starting, and the Client tab opens. On Windows, and on Linux with X11 or XWayland, the game window appears inside that tab; otherwise it opens in its own window. When the title screen appears, your mod is loaded: with the example item starter, create a creative world and find the item in the creative inventory.

To stop the game, press Stop in the toolbar. To start it again later, choose Test Client in the run configuration list and press Launch client.

What Modsmith created

Next steps