Skip to main content
Version: Minecraft 26.2

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.

PREVIEW API (1.6.0)

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​

FeatureNative APIPage
A crystal item and a crystal blockContent declaration, automatic resource generation with plexusResourcesFirst block
A crystal sprout that grows in 4 stagesBlock state properties, a block entity that ticks every tick, block behaviorGrowing block
Per-player and per-world harvest recordsEntity data, world storage (synced to the client)Stored data and commands
/garden stats, /garden growCommands, permission nodesStored data and commands
Clients without the mod get a notice before joiningJoin preparation phase exchangeJoin check
Growth display above the sprout, harvest count HUD, hotkeyBlock entity rendering, HUD layer, key bindingClient code
Automatic checks of the featuresIn-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​

  1. Check the requirements — JDK 25
  2. Get the mod template — download and unzip one zip
  3. Create the project — one initPlexusMod line
  4. plexus.mod.json — mod metadata
  5. Entrypoint — CommonModInitializer and ModContext
  6. First block — a crystal and a crystal block, automatic resource generation
  7. Growing block — block state and block entity
  8. Stored data and commands — harvest records, commands, permissions
  9. Join check — make the server and client agree on the mod
  10. Client code — rendering, HUD, key binding
  11. Game tests — check the features without a window
  12. 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.

Buy me a coffee