Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Modding Horizon

Horizon is Minecraft: Java Edition 26.3 rewritten in Rust. A Horizon mod is one .hmod package. It is one of:

KindHoldsRuns
Content modassets/ and data/: blocks, items, recipes, loot, tags, models, texturesread when the game starts
Native moda Rust crate (Cargo.toml, src/) beside the content, using the mod APIcompiled into a game the launcher builds for the player
WebAssembly moda mod.wasm beside the content, built from the same Rust sourcein the game's one sandboxed runtime, with no rebuild

Native and WebAssembly mods are written against one API, mod_api, and share one dependency model: the only difference between them is the build target.

How this book is organised

The book follows Diátaxis: each page is one of four kinds, and says so by where it lives: Start (a tutorial), Concepts (explanation), How-to and Reference. See where each doc lives.

An agents page and llms.txt give a coding agent the rules in one place.

Where things are

  • The API reference is cargo doc -p horizon-mod-api: every hook, event and Host method, with its side, its NeoForge 26.3 counterpart and its cancel contract.
  • The end-to-end example mod is horizon-machine-sample.
  • Design and milestones: #26 and #44.