BetterSpeedHUD

一款面向 Minecraft Forge 1.20.1/1.21.1 的速度 HUD 模组:在驾驶载具或使用鞘翅滑翔时,于屏幕右下角显示简洁的速度抬头显示器(HUD),展示速度、档位及速度条。所有元素均可在游戏内自由调整。
一款用于在屏幕上显示速度的 Better HUD 模组。高度可定制。@WYH827
功能特性
- 实时速度显示:基于玩家的实际坐标位移测量速度(米/秒 × 72 换算为公里/小时)。兼容原版载具和模组载具(例如 MrCrayfish's vehicle mod)。支持鞘翅滑翔。
- 视觉 HUD:左侧显示
D 档位,中间显示三位大号速度数字(前导零以灰色显示),右侧显示 km/h,下方配有速度条。
- 可调最大速度(默认 200):速度条始终显示
speed / max speed 的百分比,超出部分 capped at 100%。
- 实际速度切换:禁用时,速度达到最大速度后将停止增加(指针满格);启用时,始终显示实际速度,而速度条仍限制在最大速度的 100%。
- 两种字体:Minecraft 默认字体 / 现代位图字体(可在游戏内一键切换)。
- 游戏内配置界面(默认按键 H):
- 整体 HUD 和各个独立元素(D、数字、km/h、速度条)均拥有独立的定位、大小和可见性控制;
- 可通过拖拽、方向键、滚轮或快捷键进行调整;
- 右上角的“隐藏按钮”按钮可隐藏所有 UI 按钮,以便无遮挡地查看和定位;
- 一键切换至 Modern 预设 / 恢复默认设置;
- 最大速度 +/‑ 按钮。
- 显示条件:在载具上显示 / 在鞘翅上显示 / 始终显示(当启用“始终显示”时,前两项将被锁定为开启)。
- HUD 总开关:可随时完全隐藏 HUD。
- 安全的配置写入:拖拽和调整仅修改内存中的值;配置文件仅在设置界面关闭时写入,避免频繁的磁盘写入。
安装
- 需要 Minecraft 1.20.1 + Forge 47.x(客户端),Java 17。
- 将
BetterSpeedHUD-1.1.jar 放入 .minecraft/mods 文件夹。
- 启动游戏,进入世界,骑乘载具或使用鞘翅滑翔即可看到 HUD。
游戏内配置
按 H 打开设置界面(也可通过 Mod Menu 中的“Config”按钮访问)。
按键控制
| 按键 |
功能 |
1 ~ 5 |
选择要调整的元素(整体 / 档位 D / 数字 / km/h / 速度条) |
| 方向键 / 鼠标拖拽 |
移动当前选中的元素 |
鼠标滚轮 / + - |
缩放当前选中的元素 |
V |
HUD 总开关 |
C |
切换实际速度 |
F |
切换字体(Minecraft / Modern) |
[ ] |
减小 / 增加最大速度(Shift + 按键调整幅度为 25) |
Esc / “Save & Close” |
保存配置并关闭 |
按钮说明
- 第一行:在载具上显示 / 在鞘翅上显示 / 全局 HUD(始终显示 HUD)
- 第二行:分别切换 D / 数字 / km/h / 速度条的可见性
- 第三行:HUD(总开关)/ 实际速度 / 最大速度 ‑10 / 最大速度 +10
- 第四行:字体 / 切换至 Modern 预设 / 恢复默认设置 / 保存并关闭
- 右上角:隐藏按钮(隐藏所有 UI 按钮,以便无遮挡地查看和定位)
注意:当禁用实际速度时,速度达到最大速度后将停止增加(指针满格)。启用时,始终显示实际速度。
注意:最大速度是使进度条填满时的速度;进度条的填充比例为 speed / max speed。

配置文件
配置文件位于 .minecraft/config/speedhud-client.toml。主要字段如下:
[hud]
xOffset = 0 # 整体水平偏移(正值向右)
yOffset = 0 # 整体垂直偏移(正值向下)
scale = 1.0 # 整体缩放比例
enabled = true # HUD 总开关
showOnVehicle = true # 在载具上显示
showOnElytra = true # 在鞘翅上显示
globalHud = false # 始终显示
maxSpeed = 200 # 最大速度(进度条满格值)
showActualSpeed = false # 显示实际速度
font = "minecraft" # minecraft / modern
[hud.modules] # 模块可见性
gear = true
speed = true
unit = true
bar = true
[hud.elements.gear] # D 档位位置和缩放
x = 16
y = 40
scale = 1.0
[hud.elements.speed] # 速度数字
x = 76
y = 34
scale = 1.0
[hud.elements.unit] # km/h
x = 176
y = 46
scale = 1.0
[hud.elements.bar] # 速度条
x = 0
y = 58
scale = 1.0
Modern 字体
Modern 字体是一种自定义位图字体(由 Smiley Sans Oblique 生成):
- 纹理文件:
assets/speedhud/textures/font/modern.png,尺寸 1152×192,每行 18 个字符,每个单元格 64×192;
- 字符顺序:
0123456789DKM/Hkmh;
- 字形对齐至单元格底部(第 192 行);
- 定义文件:
assets/speedhud/font/modern.json(高度 192 / 上升高度 7)。
若要替换字体,请提供符合上述规格的 PNG 文件,并替换 assets/speedhud/textures/font/modern.png。
构建(开发者)
环境要求:JDK 17+,Gradle 8.x。
gradlew build
构建产物将位于 build/libs/BetterSpeedHUD-1.1.jar。
开源许可证
本项目采用 MIT License 发布。详见 LICENSE.txt。
作者:@WYH827
BetterSpeedHUD

A speed HUD mod for Minecraft Forge 1.20.1/1.21.1: displays a sleek speed head-up display (HUD) showing speed, gear, and a speed bar at the bottom‑right corner of the screen when riding a vehicle or gliding with an elytra. All elements can be freely adjusted in‑game.
A Better HUD mod to show your speed on your screen. Highly customizable. @WYH827
Features
- Real‑time speed display: measures speed based on the player's actual coordinate displacement (blocks/second × 72 converted to km/h). Compatible with vanilla vehicles and modded vehicles (e.g., MrCrayfish's vehicle mod). Elytra gliding is also supported.
- Visual HUD:
D gear on the left, three‑digit large speed number in the center (leading zeros shown in grey), km/h on the right, and a speed bar below.
- Adjustable max speed (default 200): the speed bar always displays the percentage of
speed / max speed, capped at 100% when exceeded.
- Toggle for actual speed: when disabled, speed stops increasing once it reaches the max speed (pegs the meter); when enabled, the actual speed is always shown, while the bar still caps at 100% of the max speed.
- Two fonts: Minecraft default font / Modern bitmap font (switchable in‑game with one click).
- In‑game configuration screen (default key H):
- The overall HUD and individual elements (D, digits, km/h, speed bar) each have independent position, size, and visibility controls;
- Adjust via drag‑and‑drop, arrow keys, scroll wheel, or shortcuts;
- A "Hide Buttons" button in the top‑right corner hides all UI buttons for unobstructed viewing and positioning;
- One‑click switch to Modern preset / restore defaults;
- Max speed +/‑ buttons.
- Display conditions: show on vehicle / show on elytra / always show (when "always" is enabled, the first two are locked to on).
- HUD master toggle: can completely hide the HUD at any time.
- Safe configuration writing: dragging and adjustments only modify in‑memory values; the config file is written only when the settings screen is closed, avoiding frequent disk writes.
Installation
- Requires Minecraft 1.20.1 + Forge 47.x (client‑side), Java 17.
- Place
BetterSpeedHUD-1.1.jar into the .minecraft/mods folder.
- Launch the game, enter a world, and ride a vehicle or glide with an elytra to see the HUD.
In‑Game Configuration
Press H to open the settings screen (can also be accessed via the Mod Menu's "Config" button).
Key Controls
| Key |
Function |
1 ~ 5 |
Select the element to adjust (Overall / Gear D / Digits / km/h / Speed bar) |
| Arrow keys / Mouse drag |
Move the currently selected element |
Mouse wheel / + - |
Scale the currently selected element |
V |
HUD master toggle |
C |
Toggle actual speed |
F |
Switch font (Minecraft / Modern) |
[ ] |
Decrease / Increase max speed (Shift + key adjusts by 25) |
Esc / "Save & Close" |
Save configuration and close |
Button Descriptions
- First row: Show on vehicle / Show on elytra / Global HUD (always show HUD)
- Second row: Toggle visibility for D / Digits / km/h / Speed bar individually
- Third row: HUD (master toggle) / Actual speed / Max speed ‑10 / Max speed +10
- Fourth row: Font / Switch to Modern preset / Restore defaults / Save & Close
- Top‑right corner: Hide Buttons (hides all UI buttons for unobstructed viewing and positioning)
Note: When actual speed is disabled, speed stops increasing once it hits the max speed (pegs the meter). When enabled, the actual speed is always shown.
Note: Max speed is the speed at which the bar becomes full; the bar's fill ratio is speed / max speed.

Configuration File
The configuration file is located at .minecraft/config/speedhud-client.toml. Main fields:
[hud]
xOffset = 0 # Overall horizontal offset (positive = right)
yOffset = 0 # Overall vertical offset (positive = down)
scale = 1.0 # Overall scale
enabled = true # HUD master toggle
showOnVehicle = true # Show on vehicle
showOnElytra = true # Show on elytra
globalHud = false # Always show
maxSpeed = 200 # Max speed (full bar value)
showActualSpeed = false # Show actual speed
font = "minecraft" # minecraft / modern
[hud.modules] # Module visibility
gear = true
speed = true
unit = true
bar = true
[hud.elements.gear] # D gear position and scale
x = 16
y = 40
scale = 1.0
[hud.elements.speed] # Speed digits
x = 76
y = 34
scale = 1.0
[hud.elements.unit] # km/h
x = 176
y = 46
scale = 1.0
[hud.elements.bar] # Speed bar
x = 0
y = 58
scale = 1.0
Modern Font
The Modern font is a custom bitmap font (generated from Smiley Sans Oblique):
- Texture:
assets/speedhud/textures/font/modern.png, 1152×192, with 18 characters per row, each cell 64×192;
- Character order:
0123456789DKM/Hkmh;
- Glyphs are aligned to the bottom of the cell (row 192);
- Definition file:
assets/speedhud/font/modern.json (height 192 / ascent 7).
To replace the font, provide a PNG following the above specifications and replace assets/speedhud/textures/font/modern.png.
Building (Developers)
Environment: JDK 17+, Gradle 8.x.
gradlew build
The built artifact will be at build/libs/BetterSpeedHUD-1.1.jar.
Open Source License
This project is released under the MIT License. See LICENSE.txt for details.
Author: @WYH827
评论 0
登录后参与评分
还没有评论,来抢沙发吧