Going further
Mods and data packs
Horizon has its own mod system, written for Horizon and not compatible with Java mods. Data packs work in part. This page says what you can do with each today.
Mods
Horizon mods are written in Rust, compiled to WebAssembly and run in a sandbox. A mod can only do what it asks for and you allow, and a mod that crashes is switched off without taking the game down.
Early. The mod system is new. There is no mod store yet, and a mod browser in the launcher is planned. Mods you find are files to put in a folder.
Playing with mods
- Put the mod's
.hmodfile in thehorizon-modsfolder of the game folder (see Install for where that is), or use the Open Mod Folder button on the Mods screen. - Open Options, Mods. Each mod is listed with what it may do ("May see your position, health and the time, draw text on your screen…") and a switch. Mods start off. Turn on the ones you trust.
- A mod that failed to load shows why, in red, on its row.
What a mod can do today
- Client mods read the same things the F3 screen shows (your position, health, food, the time), draw text panels on the HUD, show chat lines only you see, and add chat commands. They work in single player and on any server, and a server cannot see them.
- Content mods add blocks and items from data and assets: models, textures, recipes, loot tables and tags, with no code. They work in single player today. This is also what the launcher's modpack carry-over produces.
- Server mods, which run where the world is simulated, are planned.
Making a mod
rustup target add wasm32-unknown-unknown
cargo install --git https://github.com/ludovic111/horizon cargo-horizon-mod
cargo horizon-mod new my-mod
cd my-mod
cargo horizon-mod run
run builds the mod and starts the game with it. After an edit, cargo horizon-mod build rebuilds it and the running game reloads it. The full guide, with the API, the manifest and the roadmap, is docs/mods.md. What carries over from Java mods, and why jars cannot run, is in the Java mod notes.
Data packs
A world's data packs go in its datapacks folder, as folders or .zip files with a pack.mcmeta, as in vanilla.
Works today (single player and open-to-LAN worlds):
- Functions (
.mcfunction, with macros and line continuation), function tags (such asminecraft:loadandminecraft:tick), predicates and item modifiers. - The
/function,/datapackand/reloadcommands, and the choice of which packs are on, kept with the world.
Not applied from data packs yet: custom recipes, loot tables, advancements and world generation. Horizon reads those from the vanilla data it prepared, and from content mods.
Vanilla's own data is always on, and it matches vanilla: every command runs as vanilla does, and recipes, loot and world generation are checked against the real game.
Edit this page on GitHub · Spotted something wrong? Open an issue or ask on Discord.
Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.