SR

sya-ri/strata

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4 stars 质量 69 趋势 20MIT

声明式Minecraft界面,具备可复用组件树、版本无关的布局和状态,以及无需启动Minecraft的无头测试。

概览

声明式 Minecraft UI,带有可复用组件、调用者自有状态和无头渲染。 通过 Fabric Mods 或 Paper、Folia 和 Velocity 插件创建自定义屏幕和界面。对于服务器驱动的 UI,服务器或代理拥有定义、状态和事件处理程序,而所需的 Strata Fabric 客户端 Mod 负责渲染界面并传递玩家输入。原版客户端无法显示这些 UI。 本页记录了开发源代码;对于已安装版本,请使用其对应发布标签的文档。 Minecraft 界面通常将布局、输入、状态、资源和版本特定调用混合在一个类中。Strata 将这些职责分离,使界面可以通过共同的 API 进行构建、重用和测试。 - 保持一个界面作为屏幕或HUD,切换其呈现方式,并在会话中控制游戏输入。- 安排包含行、列、换行组、网格和叠加层的接口。

概述(AI 翻译)

地层

声明式 Minecraft UI,带有可复用组件、调用者自有状态和无头渲染。

用Fabric Mods或Paper、Folia和Velocity插件创建自定义屏幕和HUD。 对于服务器驱动的用户界面,服务器或代理拥有定义、状态和事件处理程序,而所需的 Strata Fabric 客户端 Mod 负责渲染界面并传递玩家输入。 原版客户端无法显示这些界面。

莫德林斯 ·机库 ·诅咒锻造

本页记录了开发源代码;对于已安装版本,请使用其对应发布标签的文档。

示例 ·静态帧

Minecraft 的界面经常将布局、输入、状态、资源和版本特定的调用混合在一个类中。 Strata 将这些职责分离,使界面可以通过共同的 API 进行组合、重用和测试。

你能建造的东西

  • 保持一个界面作为屏幕或界面,切换其呈现方式,并通过会话控制游戏输入。
  • 将接口排列为行、列、包裹组、网格和叠加层。
  • 组合控件、文本编辑器、滚动视图、图片以及Minecraft资源支持的内容。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Declarative Minecraft UI with reusable components, caller-owned state, and headless rendering.

Create custom screens and HUDs from Fabric Mods or Paper, Folia, and Velocity plugins. For server-driven UIs, the server or proxy owns the definitions, state, and event handlers, while the required Strata Fabric client Mod renders the interface and delivers player input. Vanilla clients cannot display these UIs.

Modrinth · Hangar · CurseForge

This page documents the development sources; for an installed version, use the documentation at its matching release tag.

Example · Still frames

Minecraft screens often mix layout, input, state, resources, and version-specific calls in one class. Strata separates those responsibilities so an interface can be composed, reused, and tested through a common API.

What you can build

  • Keep one interface as a screen or HUD, switch its presentation, and control game input through its session.
  • Arrange interfaces with rows, columns, wrapping groups, grids, and overlays.
  • Compose controls, text editors, scrolling views, images, and Minecraft resource-backed content.
  • Add sizing, backgrounds, pointer and keyboard actions, focus, and layout parent data through modifiers.
  • Reuse application components or implement custom primitives through the public Element and Node SPI.
  • Render portable drawing and semantics in JVM tests, with separate loaded-client verification for native behavior.

The component overview shows the available components with images and compiled examples. Complete screens demonstrate how they fit together. Try the interactive web demos for a counter, progress controls, and a keyed list running in your browser.

A screen built from components

A confirmation screen combines text, buttons, and layout components into a reusable UI definition.

Compare components and browse their examples.

Installation

Fabric client and server

Players need the Strata Fabric runtime, Fabric API, and Fabric Language Kotlin for both client-defined and server-driven UIs.

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add sya-ri/strata
新手?先看 mcpskill.org 教程 →