Hud Lib
此模组是一个库,供其他模组注册自定义 HUD 元素。这些 HUD 元素内置了重新定位、锚定和配置功能。按下 RIGHT SHIFT(可在键位绑定中重新绑定)后,所有元素均可编辑。本模组没有默认元素,如果你需要任何功能,则需要配合使用如 Generic Hud(见下文)之类的模组。
使用此库的模组
目前共有 3 个模组使用了此库:
编辑器
编辑器允许你重新定位并禁用任意 HUD 元素。如果你想隐藏设置按钮或停止吸附,请按住 CTRL。设置菜单将允许你在“Generic HUD Options”选项卡中配置每个 HUD 元素,并禁用它们或重置其位置。

给开发者
目前暂无文档,但你可以参考 Generic HUD、Armor HUD 或内部的 HUD Lib testmod,因为它们都是开源的,可作为示例。
库中提供了什么?
- 一种使用
DrawContext渲染 HUD 元素的简单方法;在渲染时,你会获得一个 X 和 Y 坐标,表示该元素应在屏幕上的渲染位置。 - 经过最少的额外设置,它们可以在编辑器中重新定位。
- 重新定位还会相对于屏幕进行锚定(例如,如果你将其放在右上角,无论屏幕尺寸如何,它都会保持在该位置)。
- 一种在“HUD Lib”配置界面中注册自定义配置的方法,这是通过 YetAnotherConfigLib (YACL) 实现的。
- 它们也可以被隐藏,仅在编辑器中显示,或在配置中完全禁用。
版本
该模组已移植到所有 1.21.X 版本。
Hud Lib
This mod is a library for other mods to register their own HUD Elements. These HUD Elements has inbuilt repositioning, anchoring, and configuration. They can all be edited after pressing RIGHT SHIFT (Can be rebinded in Key Binds). This mod has no default elements, you will need a mod such as Generic Hud (mentioned below) if you want any features.
Mods using this library
Currently there are 3 mods that uses this library:
The Editor
The editor allows you to reposition and disable any HUD Elements. If you want to hide the Settings button or stop snapping, hold CTRL. The settings menu will allow you to configure each HUD Element, and disable them/reset their position in the 'Generic HUD Options' tab.

For Developers
Currently no documentation exists, but you can use Generic HUD, Armor HUD or the internal HUD Lib testmod as an example, because they are all open source.
What is offered in the library?
- A simple way to render HUD elements, using
DrawContext, when rendering it you are also given an X and a Y coordinate which is where on the screen it should be rendered. - With minimal extra setup they can be repositioned in the editor.
- The repositioning also anchors to the screen (e.g. If you put it in the top right corner, it will stay there with any screen size)
- A way to register your own configuration in the "HUD Lib" configuration screen, this is done with YetAnotherConfigLib (YACL)
- They can also be hidden to only show in the editor, or completely disabled in the configuration.
Versions
The mod has been ported to all 1.21.X versions.
下载 HUD Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 HUD Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 HUD Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 HUD Lib
下载 HUD Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 HUD Lib
下载 HUD Lib
下载 HUD Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 HUD Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 HUD Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧