Create your first Plexus Mod
A Plexus Mod is a mod built with Plexus Mod Loader's Native API that runs on Plexus Mod Loader. It is the same kind of name as Fabric mod or Forge mod.
In this tutorial, you build a Plexus Mod called Crystal Garden from scratch. You plant a crystal sprout, it grows over time, and using a fully grown sprout gives you a crystal. It takes about 30 minutes.
You start from the mod template on the Plexus Mod Loader website, and Gradle downloads Plexus Mod Loader from the website's Maven repository. Every API is at the PREVIEW level and can change.
What you build
| Feature | Native API | Page |
|---|---|---|
| A crystal item and a crystal block | Content declaration, automatic resource generation with plexusResources | First block |
| A crystal sprout that grows in 4 stages | Block state properties, a block entity that ticks every tick, block behavior | Growing block |
| Per-player and per-world harvest records | Entity data, world storage (synced to the client) | Stored data and commands |
/garden stats, /garden grow | Commands, permission nodes | Stored data and commands |
| Clients without the mod get a notice before joining | Join preparation phase exchange | Join check |
| Growth display above the sprout, harvest count HUD, hotkey | Block entity rendering, HUD layer, key binding | Client code |
| Automatic checks of the features | In-game tests (run without a window) | Game tests |
All the code uses only the public API (dev.plexusmodloader.api.*). You need no Minecraft class names, no Mixin, and no separate API mod. So if you write "minecraft": ["26.*"] in plexus.mod.json, the mod works on the 26-series versions Plexus Mod Loader supports without rebuilding.
Steps
- Check the requirements — JDK 25
- Get the mod template — download and unzip one zip
- Create the project — one
initPlexusModline - plexus.mod.json — mod metadata
- Entrypoint —
CommonModInitializerandModContext - First block — a crystal and a crystal block, automatic resource generation
- Growing block — block state and block entity
- Stored data and commands — harvest records, commands, permissions
- Join check — make the server and client agree on the mod
- Client code — rendering, HUD, key binding
- Game tests — check the features without a window
- Build, run, and distribute — run in game and distribute the jar
If you use IntelliJ IDEA, see IntelliJ IDEA. If you get stuck, see Troubleshooting.
What the finished mod looks like
crystal-garden/
├─ settings.gradle.kts project name, where Gradle finds Plexus Mod Loader
├─ build.gradle.kts mod plugin dev.plexusmodloader.mod, plexusResources
├─ src/main/java/com/example/crystalgarden/
│ ├─ CrystalGardenMod.java common entrypoint: collects the declarations
│ ├─ CrystalSprout.java the growing sprout block
│ ├─ GardenCommands.java /garden commands
│ ├─ GardenTests.java in-game tests
│ └─ CrystalGardenClient.java client entrypoint
└─ src/main/resources/
├─ plexus.mod.json mod metadata
└─ assets/crystal_garden/ sprout block state, translations
The finished project is examples/crystal-garden in the Plexus Mod Loader source. The source is private for now, so these pages show the code of every file you write.