一个屏幕即可排列游戏中的所有 HUD 元素
按下 K。将快捷栏拖到更合适的位置。缩小记分板。隐藏准星。将某个模组的卡片从生命值条下方移开。关闭界面,设置即会保持。

kUI 是 KALPE 模组背后的共享界面层。每个 kUI 模组的所有 HUD 元素都汇聚到一个注册表中,通过同一个渲染钩子绘制,并在同一个编辑器中进行排列。两个模组不再会将它们的卡片互相覆盖,元素的绘制顺序由你控制,而不再是取决于哪个模组先加载的偶然结果。
原版 HUD 也包含在内。 快捷栏、生命值、饥饿值、护甲值、氧气值、坐骑生命值、经验值与等级条、手持物品名称、动作栏、准星、标题文字、副标题、Boss 血条、状态效果、记分板、玩家列表和聊天窗口都可以移动、调整大小和隐藏——无需 Mixin,无需资源包,且不会阻止游戏将它们放回原位。
围绕原版元素的选中框是精确测量的,而非猜测:kUI 在临时状态下运行该元素自身的渲染器,并获取其绘制的真实边界。该框贴合你实际拥有的记分板及其实际的行。
在编辑器中
|
|
| 拖拽 |
移动任意元素 |
| 滚轮 |
调整大小 |
| Ctrl + 滚轮 |
淡化某模组的元素 |
| 右键点击 |
显示 / 隐藏 |
| 中键点击 |
循环切换元素的样式(如果存在多种样式) |
| Ctrl + 点击 |
多选,然后分组 |
| 双击 |
进入组内编辑单个成员 |
| 方向键 |
微调 1px,按住 Shift 则微调 10px |
分组的元素作为一个整体移动——快捷栏及其绑定的条形预设为分组状态,因为单独移动快捷栏而不移动生命值条几乎从来不是任何人想要的效果。
你保留为停靠状态的元素会自动堆叠到角落的通道中,因此无论添加多少模组,它们都不会重叠。将任意元素拖拽到别处,它会切换为自由放置模式,存储为距最近角落的偏移量,这样在调整窗口大小时它也能保持原位。
统一的强调色,无处不在
在编辑器中选择一种颜色,所有 kUI 模组都会遵循它——面板、边框、高亮、HUD 卡片。模组可以保留自己的强调色以体现其特色,你也可以覆盖它。全局 UI 缩放比例、按元素缩放比例以及按元素透明度都集中在同一位置进行设置。
你的布局保存在 config/kui/layout.json 中,按模组索引,因此卸载某个模组绝不会干扰其余部分,且任何单个元素都可以单独重置。
要求
Fabric,仅限客户端。需要 Fabric API。专为 1.21.8 和 1.21.11 构建——请下载与你版本匹配的文件。
单独使用时,kUI 提供原版 HUD 编辑器。安装任何基于 kUI 构建的模组后,该模组的元素将出现在同一屏幕上,与其他所有元素一起排列。

正在开发带有 HUD 的 Fabric 模组?kUI 为你提供注册表、布局引擎、编辑器、主题和绘图基元,因此你只需编写元素本身,无需其他操作:
KuiMod.of("mymod", "My Mod")
.accent(0xFF9B3D)
.settings(MySettingsScreen::new)
.element(new MyElement())
.register();
这就是全部集成代码。你的元素将获得拖拽、调整大小、淡化、分组、与其他模组元素的 Z 轴排序功能,以及共享编辑器中的位置——这些都不需要你编写,且在配置文件中表现得与所有其他 kUI 模组完全一致。
使用 Theme.accent(modId) 和 Draw.roundedCard 进行绘制,而不是硬编码的颜色和矩形,你的 HUD 就能自动适应用户选择的强调色。
GitHub 上的完整集成指南 →
五个步骤,并为那个棘手的部分提供了可复制粘贴的模板:处理未安装 kUI 的情况。在 recommends 下声明它,而不是 depends,将你的 dev.kui 引用放在单个门控类之后,这样没有库的玩家会看到一个解释如何安装的屏幕,而不是启动失败。

kUI 可免费使用和随模组分发。你可以基于它进行构建,也可以未经修改地重新分发它——包括捆绑在你自己的模组中——无需许可,无需付费。
不允许的是发布修改后的 kUI,或以其他名称或作为你自己的作品发布它。私下修补你自己的副本以便调试或准备修复补丁以提交上游,是被明确允许的。
Copyright © 2026 KALPE. 完整许可证 →
One screen to arrange every HUD in your game
Press K. Drag the hotbar somewhere better. Shrink the scoreboard. Hide the crosshair. Move a
mod's card out from under your health bar. Close the screen, it stays that way.

kUI is the shared interface layer behind the KALPE mods. Every HUD element from every kUI mod lands
in one registry, draws through one render hook, and is arranged in one editor. Two mods can no
longer drop their cards on top of each other, and the order things draw in is a number you control
rather than an accident of which mod happened to load first.
Vanilla's HUD is in there too. The hotbar, health, hunger, armour, air, mount health, XP bar and
level, held-item name, action bar, crosshair, title text, subtitles, boss bar, status effects,
scoreboard, player list and chat can all be moved, resized and hidden — no mixins, no resource pack,
and nothing stopping the game from putting them back exactly where they were.
The selection box around a vanilla element is measured, not guessed: kUI runs the element's own
renderer against a throwaway state and takes the true bounds of what it drew. The box fits the
scoreboard you actually have, with the lines it actually has.
In the editor
|
|
| Drag |
Move anything |
| Scroll |
Resize |
| Ctrl + scroll |
Fade a mod's element |
| Right-click |
Show / hide |
| Middle-click |
Cycle an element's look, where it has more than one |
| Ctrl + click |
Multi-select, then group |
| Double-click |
Step inside a group to edit one member |
| Arrow keys |
Nudge 1px, or 10 with Shift |
Grouped elements move as one — the hotbar and the bars welded to it come pre-grouped, because
moving the hotbar without your health bar is almost never what anyone wants.
Elements you leave docked stack automatically into a lane at their corner, so they cannot
overlap no matter how many mods you add. Drag one anywhere and it switches to free placement,
stored as an offset from the nearest corner so it stays put when you resize the window.
One accent, everywhere
Pick a colour in the editor and every kUI mod follows it — panels, borders, highlights, HUD cards.
Mods can carry their own accent where their identity matters, and you can override that too. Global
UI scale, per-element scale and per-element opacity all live in the same place.
Your arrangement is stored in config/kui/layout.json, keyed by mod, so a mod you uninstall never
disturbs the rest and any single element can be reset on its own.
Requirements
Fabric, client-side only. Needs Fabric API. Built for 1.21.8 and 1.21.11 — grab the file
matching your version.
On its own, kUI gives you the vanilla-HUD editor. Install any mod built on it and that mod's
elements appear in the same screen, arranged alongside everything else.

Building a Fabric mod with a HUD? kUI hands you the registry, the layout engine, the editor, the
theme and the drawing primitives, so you write the element and nothing else:
KuiMod.of("mymod", "My Mod")
.accent(0xFF9B3D)
.settings(MySettingsScreen::new)
.element(new MyElement())
.register();
That is the whole integration. Your element gets dragging, resizing, fading, grouping, z-ordering
against other mods' elements, and a place in the shared editor — none of which you have to write,
and all of which behaves identically to every other kUI mod on the profile.
Draw with Theme.accent(modId) and Draw.roundedCard instead of hardcoded colours and rectangles,
and your HUD follows the user's chosen accent for free.
Full integration guide on GitHub →
Five steps, with copy-paste templates for the one fiddly part: handling the case where kUI is not
installed. Declare it under recommends rather than depends, keep your dev.kui references
behind a single gate class, and a player without the library gets a screen explaining what to
install instead of a launch failure.

kUI is free to use and free to ship with. You may build on it, and you may redistribute it
unmodified — including bundled inside your own mod — with no permission needed and nothing to pay.
What is not allowed is publishing a modified kUI, or publishing it under another name or as your
own work. Patching your own copy privately, to debug or to prepare a fix to send upstream, is
explicitly fine.
Copyright © 2026 KALPE. Full licence →
评论 0
登录后参与评分
还没有评论,来抢沙发吧