Your first content mod
A content mod adds blocks, items, recipes, loot, models and textures with data files alone. In this page you make one block, see it in the game, and pack it as a .smod.
From Sunrise's modding bookead8a1e
On this page
You need Rust 1.95 or newer (cargo) and the Sunrise launcher with an instance to play in.
1. Install the mod tool
cargo install --locked --git https://github.com/sunrise-org/sunrise cargo-sunrise-modThis adds the cargo sunrise-mod command.
2. Make the project
cargo sunrise-mod new glowing-blocks
cd glowing-blocksThe tool turns the folder name into the mod id (glowing_blocks) and writes a complete mod with one block:
glowing-blocks/
├── sunrise-mod.toml # the manifest: id, name, version, api, capabilities
├── assets/glowing_blocks/
│ ├── blockstates/glowing_amethyst.json
│ ├── models/block/glowing_amethyst.json
│ ├── items/glowing_amethyst.json # the item model
│ └── lang/en_us.json # the block's name
└── data/
├── glowing_blocks/sunrise/block/glowing_amethyst.json # the block itself
├── glowing_blocks/loot_table/blocks/glowing_amethyst.json
├── glowing_blocks/recipe/glowing_amethyst.json
└── minecraft/tags/block/mineable/pickaxe.jsonThe block declaration starts from a vanilla block and changes what differs:
{
"template": "minecraft:amethyst_block",
"properties": { "hardness": 2.0, "light": 7 }
}The manifest declares the capability registries: a mod needs it to add blocks, items, mob effects or entity types to a world.
3. Build it
cargo sunrise-mod buildThis validates the content with the same checks the game uses and writes target/sunrise-mod/glowing_blocks.smod, the file you share.
4. Play it
- In the launcher, open your instance's folder: Open folder in the instance's ⋮ menu in the sidebar. This is the game folder, the one that holds
options.txt. - Copy
glowing_blocks.smodinto itssunrise-mods/folder (create the folder if it is missing). - Turn the mod on: add the line
mod.glowing_blocks:truetosunrise-mods.txtin the same game folder. - Start the instance, open a world and craft the block from an amethyst block and glowstone dust.
The game reads content once, at start-up: after you edit a file, build again, copy the new .smod and restart.
If you run a Sunrise game you built yourself, cargo sunrise-mod run --game <path to sunrise-client> builds the mod and starts that game with it always on.
5. Check it before you publish
cargo sunrise-mod check target/sunrise-mod/glowing_blocks.smodcheck runs what the mod registry runs on a submission (Publishing your mod).
Next
- Content mods: every kind of content file, from blocks to world generation.
- The manifest and the package: every manifest field and package rule.
- Publishing your mod: signing and the registry.
Edit this page on GitHub · Spotted something wrong? Open an issue or ask on Discord.



