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
- A 64-bit Windows 10 or 11 PC, or an x86-64 Linux PC.
- An internet connection. The first build of a project downloads Minecraft, the mod loader and its Gradle plugin.
- Java is optional at this point: Modsmith offers to download the version a project needs.
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:
- Java checks what is installed. If it reports that new Fabric 1.21.1 projects need a JDK you do not have, press Download Java. Modsmith downloads Eclipse Temurin from Adoptium into its own data folder; nothing is installed system-wide.
- CurseForge API key (optional) only matters if you want to search CurseForge. Modrinth works without a key. You can add one later in Settings, Providers.
3. Create a mod project
Press New mod on the welcome screen. The wizard has four steps: Template, Details, Configure and Create.
Template
- Choose the Loader: Fabric, NeoForge or Forge.
- 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".
- 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
commonfolder 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…. - 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
- Enter a Project name, for example Gem Tools.
- Under Location, press Browse… and pick a parent folder. The project gets its own folder inside it.
- 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.
- 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
- 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.
- 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.
- If the step says no suitable JDK is installed, press Download JDK and wait for it to finish. Press Next.
Create
- Review the summary. Leave Run the first Gradle build now ticked: it downloads Minecraft and the toolchain, which takes about 1 to 3 minutes.
- Press Create project and watch the progress and log.
- 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
- A normal Gradle project from the loader's official example mod, with your mod's Java code under
src/main/javaand its assets and data undersrc/main/resources. You can also open it in IntelliJ IDEA or another IDE. modsmith.json, which describes the project and its run configurations, andmodsmith.lock.json, which records the exact versions of any test mods.- A
.modsmithfolder for logs and the isolated game folders of each run configuration. It is added to.gitignore.
Next steps
- Build and test a mod: change code, apply it to the running game and debug.
- Test with other mods: add mods from Modrinth or CurseForge, or a whole modpack.
- All features