快捷栏外观
原版贴图文件、攻击指示器和 HUD 外饰参考
Hotbar 外观分为原版资源替换和普通 Layout 外饰。
需要完整操作流程时,先阅读Hotbar 外观制作。本页代码未标为完整文件时,均为对应节点中的片段。
文件关系
hotbar.png
hotbar_selection.png
hotbar_offhand_left.png
hotbar_offhand_right.png
hotbar.yml
default.yml
原版替换文件
目录:
core/assets/hotbar| 文件 | 必须尺寸 | 客户端用途 |
|---|---|---|
hotbar.png | 182×22 | 九格 Hotbar 背景 |
hotbar_selection.png | 24×23 | 当前选中槽位 |
hotbar_offhand_left.png | 29×24 | 左侧副手槽位 |
hotbar_offhand_right.png | 29×24 | 右侧副手槽位 |
hotbar_attack_indicator_background.png | 18×18 | 可选攻击指示器背景 |
hotbar_attack_indicator_progress.png | 18×18 | 可选攻击指示器进度 |
文件必须是有效 PNG 且尺寸精确,否则 /xerr pack 会明确失败。删除某个文件可恢复该项原版外观。
副手显示规则
- 副手为空时,客户端不绘制副手槽位框。
- 副手有物品时,根据主手设置使用左侧或右侧贴图。
- Xerr 不额外生成常驻副手框。
外饰 Layout
hotbar:
decoration:
anchor:
x: 50
y: 100
x: -99
y: 49
image:
namespace: xerr_ui
basename: panel
id: hotbar_frame外饰不受原版 182×22 尺寸限制,但必须为物品格、副手和需要保留的原版 HUD 区域留出透明空间。
经验条
经验条使用普通进度元素:
experience:
anchor:
x: 50
y: 100
x: -91
y: 39
progress:
namespace: xerr_ui
basename: experience
image:
full: full
empty: empty
fill:
direction: left-to-right
steps: 182
variables:
total: "1"
current: "player exp"
refresh: 5Xerr 默认不绘制等级数字;需要时在同一 Layout 添加文字。
原版生命和饥饿
是否隐藏由 config.yml 控制:
feature:
hide:
hud:
heart: true
food: true这些字段修改后也需要重新打包。
边界
普通 Xerr HUD 不会移动原版物品渲染。避免遮挡的可靠方式是让外饰图片在物品区域保持透明。