API анықтамасы
Мод API-інің барлық интерфейстері mod SDK ішіндегі WIT файлдарынан жасалады. Lua модтары сол API-ді bh кестесі арқылы пайдаланады: атаулар Lua-да қалай аталады.
Version: blockheads:api@0.3.1
Интерфейстер
events | Game events with priorities and cancellation. |
commands | Chat and console commands registered by mods. |
players | Connected players. |
scheduler | Delayed and repeating tasks. |
storage | A small per-mod, per-world key-value store. |
log | Logging to the server console or the client log. |
host | Facts about the running host and the calling mod. |
services | Cross-mod services (shape only in 0.1; implemented since 0.2; across the network since 0.3.1). |
channels | Named byte channels between mods, and between a server mod and its client half. |
guest | Callbacks every mod exports. |
types | Shared 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. |
ui | Mod UI on the client (IG-HUD, IG-ModUI): HUD widgets, toasts, notices and dialogs. |