Add new commands, chat tools, minigames, shops, land claims, hats, items and weapon skins to The Blockheads. Mods run on the server, on the player's game, or on both. Players who join a modded server see the list of mods, say yes, and the client part downloads straight from the server.
Note
Preview. The Blockheads Server, the PC client and the Android mod loader (installed with the Patcher) already run mods. Things may still change before 1.0.
Your own /commands, chat filters, welcome messages, reminders and countdowns.
|
React to blocks placed and broken, damage, deaths and movement. Cancel what you don't want. |
| Hats, hair, decoration items, blocks and weapon skins with your own pixel art. | HUD elements, toasts, dialogs and a settings page for your mod. |
| Services, events and channels: a shop can use an economy mod, a client mod can ask the server. | Sandboxed Lua and WASM, permissions the server owner grants, time budgets, and a reviewed public list. |
Install the bhmod tool (needs Rust):
cargo install --git https://github.com/Blockheads-Club/mod-sdk bhmodLua (easiest):
bhmod new my-mod # creates my-mod/ with mod.toml and server/main.luau
cd my-mod
bhmod check . # finds mistakes in mod.toml and the files
bhmod pack . # builds my-mod-0.1.0.bhmodRust (WASM):
rustup target add wasm32-wasip2
bhmod new my-mod --lang rust
cd my-mod && ./build.sh && bhmod pack .Copy the .bhmod (or the unpacked mod folder) into the server's mods folder (<data dir>/mods/, or
BLOCKHEADS_MODS_DIR) and grant the permissions it asks for in mods.toml there:
[hello-lua]
grant = ["players:chat"]Step by step: your first Lua mod and your first Rust mod. Done? Publish it so everyone can find it.
Every basic example comes as a Lua and a Rust twin that behave exactly the same (a test checks it).
| Example | What it does |
|---|---|
hello-lua / hello-rust |
/hello, greets players who join |
chat-filter / chat-filter-rust |
Cancels and rewrites chat |
scheduler-lua / scheduler-rust |
/countdown, /remind |
prices-lua / prices-rust |
A client mod asks a server mod for prices (/price <item>) |
economy, shop-rust, shop-java |
Money and a shop that uses it |
landclaim |
Protect your land |
hud-lua / hud-rust, settings-lua |
On-screen UI and mod settings |
cosmetics-hats, decor-items |
Hats, hair and decoration (docs/content.md) |
weapon-skins |
Re-skins the held tool (PC client, native tier) |
voice-rust |
Voice chat (docs/voice.md) |
More languages: Rust, C, Zig and Go in docs/wasm.md; Java and Kotlin in docs/jvm.md
(unsandboxed, so they need the native permission and a host with JVM support turned on). Native mods hook the game
itself through a small C ABI and load only from the reviewed index, after the player confirmed a red warning:
docs/native.md.
Server Runs your server mods |
Blockheads PC Runs client mods on PC |
Patcher Installs the Android loader |
Mods The public mod list |
All apps, guides and downloads: blockheads.club
Repository map
| Path | What |
|---|---|
wit/blockheads-api/ |
The mod API (blockheads:api@0.3.1, WIT): events (incl. gameplay), commands, scheduler, storage, players, services (also across the network, client <-> server), channels, client UI (HUD, toasts, dialogs), mod content (items, blocks, cosmetics); the frozen 0.1, 0.2 and 0.3.0 copies are in wit/compat/ |
docs/luau-api.md |
How the API looks from Lua |
docs/wasm.md |
WASM mods: Rust SDK, C/Zig/TinyGo, how the host runs them, the conformance suite |
docs/jvm.md |
JVM mods: Java/Kotlin SDK (generated from the WIT), how the host runs them, Android (ART) |
sdk/rust/blockheads-mod |
The Rust SDK (bindings + closures for events, commands, tasks) |
docs/native.md |
Native mods: the libbhmod C ABI and header, hook kinds, who may load native code, weapon skins |
docs/package.md |
The .bhmod package and its rules |
docs/hot-reload.md |
Hot reload of single mods, the time accounting (/mods timings), the developer watcher |
schema/ |
JSON Schemas for mod.toml, index entries and the published index.json |
docs/protocol-0xbc.md, vectors/ |
Client ⇄ server mod protocol and its byte-exact test vectors |
crates/bhmod-manifest |
Reads and checks mod.toml and packages |
crates/bhmod-proto |
Encodes and decodes the 0xBC protocol |
crates/bhmod-cli |
The bhmod tool (check, pack, new, index) |
crates/bhmod-native |
The libbhmod ABI, the armv7 inline-hook relocator and the hook engine both clients share |
crates/bhmod-index |
Checks, builds and signs the public mod index (docs/index.md) |
crates/bhmod-core |
The shared mod host (GPL, built from M1 on) |
crates/bhmod-wasm |
The WASM runtime of the host: wasmtime, Cranelift / Pulley, deadlines, memory limits, compile cache (GPL) |
crates/bhmod-voice |
Voice chat core of the hosts: session crypto, frame layouts, server relay, jitter buffer, mixer, VAD (GPL; no audio devices) |
The bhmod new templates (Luau, Rust, Java) carry a commented-out example of a remote = true service in mod.toml
and the entry file, and a README section with the limits.
Developing the SDK
scripts/build-wasm.sh (needs rustup target add wasm32-wasip2), then cargo test --workspace. CI also runs
clippy, rustfmt, the WIT check, the examples, the Luau ⇄ WASM conformance suite and a 100 % line coverage gate
(cargo llvm-cov --workspace --ignore-filename-regex 'bhmod-wasm/src/wit' --fail-under-lines 100; the excluded files
hold only wasmtime's generated bindings).
Your mod is yours: pick any licence you like. The API, schemas, tools and examples here are MIT OR Apache-2.0;
bhmod-core, bhmod-wasm and bhmod-voice are GPL-3.0-or-later with an exception for mods. Details:
LICENSING.md.
Not affiliated with Majic Jungle or Noodlecake. Mods must not include original game files.

