UI System
Hytale provides four distinct UI systems, each designed for different use cases.
The Four Systems
Section titled “The Four Systems”| System | Use Case | Docs |
|---|---|---|
| Custom Pages | Menus, dialogs, forms, custom interfaces | Custom Pages |
| Windows | Inventory, crafting, containers | Windows |
| HUD | Persistent overlays, status displays | HUD |
| Entity UI | World-space UI (health bars, damage numbers) | Entity UI |
Which System Should I Use?
Section titled “Which System Should I Use?”Coming from Minecraft?
Section titled “Coming from Minecraft?”| Hytale | Minecraft equivalent |
|---|---|
| Windows | Java Edition container GUIs (chest, furnace, crafting) |
| Custom Pages | Bedrock Edition forms - but with full markup, styling, and layouts |
| HUD | Scoreboard overlays |
| Notifications | Action bar / toast messages |
| Event Titles | /title command display |
| Kill Feed | Death messages |
| Entity UI | Nameplate and health bar rendering |
Custom Pages
Section titled “Custom Pages”The primary system for custom UIs. Uses .ui markup files with a curly-brace DSL and server-side event handling.
// open a custom page (see Player API for PlayerRef)Player player = store.getComponent(ref, Player.getComponentType());PlayerRef playerRef = store.getComponent(ref, PlayerRef.getComponentType());MyPage page = new MyPage(playerRef);player.getPageManager().openCustomPage(ref, store, page);See: Custom Pages | Builders | Markup | Styling
Windows
Section titled “Windows”For inventory and crafting interfaces with item slots. Different paradigm from pages - uses ItemContainer and slot transactions.
WindowManager windowManager = player.getWindowManager();ContainerWindow window = new ContainerWindow(...);windowManager.openWindow(ref, window, store);See: Windows
Control built-in HUD components (health, mana, compass), send notifications, display event titles, customize the kill feed, or create custom overlays.
HudManager hud = player.getHudManager();hud.hideHudComponents(playerRef, HudComponent.Compass);See: HUD
Entity UI
Section titled “Entity UI”World-space UI attached to entities - health bars, damage numbers, nameplates.
See: Entity UI
Event Flow
Section titled “Event Flow”All UI systems follow a server-authoritative model:
Every interaction is a network round-trip. Latency equals ping. Plan your UI accordingly - batch updates when possible and use interface locking to prevent spam clicks.