Strata

object Strata(source)

Server-owned UI entry point for dedicated and integrated Fabric servers. Operations require the server thread after Fabric emits SERVER_STARTED; async callers must schedule there first. Create mutable state inside open's factory and keep it on that server's execution owner.

Functions

Link copied to clipboard
fun capabilities(player: ServerPlayer): UiClientCapabilities?

Returns negotiated capabilities, or null before readiness or after disconnect.

Link copied to clipboard
fun <T> execute(server: MinecraftServer, operation: () -> T): T

Executes synchronously on the calling server thread without scheduling asynchronous work.

Link copied to clipboard
fun listen(server: MinecraftServer, ownerMod: ModContainer, listener: (StrataUiEvent) -> Unit): AutoCloseable

Subscribes to committed notifications on the server owner. Close the subscription on that owner; release and server shutdown also remove it. Listener failures are reported without rolling back a committed transition.

Link copied to clipboard
fun open(ownerMod: ModContainer, player: ServerPlayer, definition: () -> UiDefinition): UiSession

Creates state and a definition on the server owner, returning its presentation handle.

Link copied to clipboard
fun register(server: MinecraftServer, ownerMod: ModContainer, projectionType: ProjectionType)

Registers a schema for future negotiations; existing connections must reconnect.

Link copied to clipboard
fun release(server: MinecraftServer, ownerMod: ModContainer)

Releases an owner's sessions, extension schemas, and notification subscriptions.