Skip to content

API reference ​

Every interface of the mod API, generated from the WIT files in the mod SDK. Lua mods use the same API through the bh table: how names map to Lua.

Version: blockheads:api@0.3.1

Interfaces ​

eventsGame events with priorities and cancellation.
commandsChat and console commands registered by mods.
playersConnected players.
schedulerDelayed and repeating tasks.
storageA small per-mod, per-world key-value store.
logLogging to the server console or the client log.
hostFacts about the running host and the calling mod.
servicesCross-mod services (shape only in 0.1; implemented since 0.2; across the network since 0.3.1).
channelsNamed byte channels between mods, and between a server mod and its client half.
guestCallbacks every mod exports.
typesShared types used by every other interface.
content(0.3) Content a mod declares in [content] of mod.toml and the numeric ids the world gave it, plus cosmetics: a server mod puts one of its own cosmetics on a player and the modded clients draw it.
uiMod UI on the client (IG-HUD, IG-ModUI): HUD widgets, toasts, notices and dialogs.

Worlds ​

core, server-mod, client-mod

Unofficial community project. Not affiliated with Majic Jungle Software or Noodlecake. No game files are included.