@lectern/ui
v0.1.0
Published
Typescript UI Library For Minecraft Bedrock Edition
Downloads
204
Readme
Lectern UI
Typed form utilities for Minecraft Bedrock. Version 0.1.0 targets the stable
@minecraft/server-ui 2.1 API.
Entry points
import { ActionFormBase } from "@lectern/ui/action";
import { MessageFormBase } from "@lectern/ui/message";
import { ModalFormBase } from "@lectern/ui/modal";
import { CustomFormBase } from "@lectern/ui/custom";
import { MessageBoxBase } from "@lectern/ui/message-box";
import { ObservableScope } from "@lectern/ui/observable";Import @lectern/ui/runtime to automatically initialize the default item-use
form registry, or call initializeFormRegistry() explicitly. Ordinary imports
do not subscribe to world events.
@lectern/ui/preview contains the server-ui 2.2 image helper and must only be
used with a matching preview runtime.
Documentation
- Action forms
- Message forms
- Modal forms
- Reactive custom forms
- Reactive message boxes
- Form registry
- Lifecycle and results
Tests
npm test builds the package and runs mocked Minecraft API tests. Actual form
clicks still require a real Bedrock client, so GameTest is best used for runtime
smoke tests rather than response-selection assertions.
