Tapestry divides mod startup into discrete, enforced phases. Every API call validates the current phase and throws immediately if used incorrectly. This prevents timing-related bugs and ensures mods interact with Minecraft only when it is safe to do so.
Capability-Driven Extensions
Extensions declare capabilities and dependencies rather than exposing a monolithic API. This allows safe integration between systems and prevents cross-mod violations through a structured capability model.
TypeScript-First Development
Write mods in TypeScript with full type safety. A GraalVM runtime executes your code while the Java core enforces safety checks. Modern tooling and familiar syntax meet runtime protection.
Frozen Host API
The host API is sealed during startup and becomes immutable before mod code runs. This guarantees a stable runtime surface and prevents unexpected mutations during execution.
Deterministic Execution
Predictable execution ordering and phase transitions eliminate timing-related bugs common in traditional modding. Systems initialize in a known order with well-defined API availability.
Built for Complex Mods
Explicit lifecycle stages and capability declarations allow large mods to remain maintainable as they grow. Structured initialization prevents the fragility that emerges from ad-hoc ordering.
Minecraft modding has grown organically over many years, but this flexibility introduces structural problems:
Initialization order becomes unclear – hooks fire in unpredictable sequences
Systems depend on fragile timing assumptions – mods break when load order changes
APIs mutate during startup – no guarantee of a stable surface
Large mods become difficult to maintain – interdependencies grow tangled
Tapestry solves these problems by enforcing a strict, explicit lifecycle model.
Instead of loosely ordered hooks, Tapestry defines clear execution phases and prevents mods from performing operations outside their allowed window. This creates a predictable environment where:
Systems initialize in a known order
APIs become available at well-defined phases
Illegal operations fail immediately
Runtime behavior remains deterministic
💡 If the framework ever does not know what phase it is in, it is already broken.
tapestry.mod.define({ onLoad(api) { console.log("Hello from Tapestry!"); }});
Mods interact with Tapestry through a frozen host API that exposes capabilities such as RPC, overlays, persistence, and events—all while enforcing lifecycle restrictions.
A lightweight JSON-RPC transport enables remote procedure calls and event pushes between client and server. Mod authors register server-side RPC handlers and call them from client code (and vice versa) with automatic handshake and rate-limiting.