Simple Info HUD
适用于 Minecraft 的客户端模组,提供简洁的 HUD(平视显示器),以紧凑格式显示坐标、朝向、世界时间及其他游戏内信息。
旨在作为 F3 调试屏幕的非侵入式替代方案,在一行中提供有用的信息。
显示信息的简要摘要:
- 坐标
- 方向
- 世界时间和现实时间
- 生物群系
- FPS(每秒帧数)
在极小的屏幕区域内提供有价值的信息!
[!NOTE]
用法与详情
按 F4 键切换 HUD 显示模式,可在 Minecraft “控制”设置中进行配置。默认显示以下内容:
- 坐标:
[x y z],其中 y 表示高度/层数。
- 朝向:
North(北)、South(南)、West(西)、East(东)、NW、NE、SW、SE。
示例:
[220 16 440] [NE]
再次按下显示模式键可显示附加信息:
- 精确朝向角度,范围为
-180° 到 +180°,以北为基准。0° 为正南,+90° 为正东。
- 世界时间,采用
HH:MM 格式。为了匹配 时钟 物品,一天从早上 6 点开始。
颜色指示日落(黄昏)、夜晚和日出(黎明)期间的一些事件:
18:00:白天结束,日落开始,村民回床睡觉
18:32:可以使用床,不死生物不再燃烧
19:11:敌对生物开始在户外生成
04:48:敌对生物停止在户外生成
05:27:不能再使用床,不死生物开始燃烧
06:00:日出结束,白天开始,玩家和村民从床上醒来
- 上述时间戳适用于晴朗天气。
降雨和雷暴会延长床的使用时间、敌对生物生成时间和不燃烧时间段,因此它们开始得更早,结束得更晚。
- 生物群系的易读名称,已翻译为您当前的游戏语言
示例:
[220 16 440] [NE +132.5°] 18:32 Jungle
再次按下该键可显示更多附加信息:
- 世界天数
- 游戏刻 中的精确世界时间。一个 Minecraft 日持续 24000 刻。
- 现实本地时间,采用
HH:MM:SS 格式。
- 每秒帧数 (FPS)
示例:
[220 16 440] [NE +132.5°] Day 123 18:32 T12542 21:52:45 Jungle 60 FPS
再次按下该键可禁用 HUD,再次按下则循环回到显示简单信息。
安装
使用预构建的 jar 文件:
从源代码编译:
- 安装 Java JDK(不仅仅是 JRE!),最好是现代版本,如 OpenJDK 21。
- 从 Github 克隆此仓库。
- 在克隆的仓库目录中运行
./gradlew build。
sudo apt install default-jdk
git clone https://github.com/MestreLion/SimpleInfoHUD.git
cd SimpleInfoHUD
./gradlew build
生成的 .jar 文件位于 ./build/libs 中,可用于安装模组。
待办事项
- 使用更多颜色:
- 生物群系、温度等
- 高度:蓝色表示海平面,黄色/青色/红色表示顶层黄金、钻石、岩浆湖等
- 星期/月相。
- 允许_基本_自定义,例如 HUD 位置、大小和颜色。
- 配置文件以持久化显示模式。
- 通过 Github Actions 自动发布到 Modrinth、CurseForge 和 Github Releases。
- 针对不同主要 Minecraft 版本的分支。
不做事项
-
添加大量功能或游戏内自定义选项。有更好的模组可以实现这些功能,包括 MiniHUD。Simple Info HUD 的理念是保持简洁、紧凑,并提供良好的默认设置。即插即用,无需折腾。
-
添加光照等级。您所站立的单个方块的光照等级几乎毫无用处,且对该光照等级着色可能会产生误导,因为生物生成机制非常复杂。此类信息不属于简单的 HUD,而应属于显示在方块本身的正确覆盖层,例如 MiniHUD 的光照等级覆盖层或 Shedaniel 的专用模组 Light Overlay。
说到 MiniHUD...
为什么不用 MiniHUD?
MiniHUD,Masa 制作的令人惊叹且知名的模组,提供了非常相似的功能以及_海量_其他特性。
那么 Simple Info HUD 为何存在?
- 首先,Simple Info HUD 早于 MiniHUD。我最初在 2013 年为 Minecraft
1.5.2(是的,是 1.5,不是 1.15!)开发它,而 MiniHUD 直到 2016 年才首次发布。
- 不支持在同一行中聚合不同的数据。MiniHUD 在设计上会将每条信息显示在其自己的行中。
- 不支持动态颜色,例如 Simple Info HUD 的世界时间会根据一天中的不同时段改变颜色以指示特殊事件。
- 不支持(正确的)整数坐标。使用
%.0f 隐藏小数部分会 四舍五入 该数字,可能会向上取整,而不是正确地向下 截断。
这意味着坐标 1234.5 将显示为 1235,这很可能 不是 你想要的结果。
这是 Java 的限制,因为它没有将 float 截断为 int 的格式化选项,因此你需要使用 %.1f 来显示一位小数作为变通方法。
Simple Info HUD 像 F3 调试屏幕一样使用整数来表示位置坐标,并按预期显示 1234。
贡献
非常欢迎补丁和拉取请求,特别是针对待办事项列表中的功能。也欢迎提交错误报告、建议和评论!
如果你想修改代码,最简单的方法是设置一个开发环境,比如 IDE。
- Fabric 提供了一个很好的 教程 用于配置 IntelliJ IDEA。
- 你也可以使用任何你喜欢的 IDE,例如 Microsoft Visual Studio Code,或者根本不使用 IDE,仅使用任何基本的文本编辑器。
致谢与免责声明
这是我第一个模组的重制版,该模组制作于 2013 年,适用于 Minecraft 1.5.2/1.6.1。
它面向的是 ModLoader,这可能是最古老的模组加载器“平台”,当时 Forge 支持它。
出于历史目的,那个古老的版本仍然可以在本仓库的
modloader 分支 中找到。
它在开发这个更新版本时作为主要参考,请查看其
README 以获取原始参考和致谢信息。
使用 Fabric 的 模板模组生成器 创建
欢迎自由使用、分叉和贡献!
Copyright (C) 2024 Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. See <http://www.gnu.org/licenses/gpl.html>
Simple Info HUD
Minecraft client-side mod for a simple HUD (Heads-on-Display) that shows coordinates, facing direction, world time and other in-game information in a consise format.
Designed to be an unbtrusive version of the F3 Debug screen, offering useful info in a single line.
Brief summary of the information displayed:
- Coordinates
- Direction
- World and real-life day time.
- Biome
- FPS
Valuable information in very little screen area!
[!NOTE]
- Requires Fabric and Fabric API
- Currently supports only Minecraft 1.16.4/1.16.5, as it was (re-)created for using in Skyblock 2.1.
Support for all major versions up to latest is planned.
Usage and details
F4 cycles HUD display mode, configurable in Minecraft "Controls" setting. By default is displays:
- Coordinates:
[x y z], y being the altitude / layer.
- Facing direction:
North, South, West, East, NW, NE, SW, SE.
Example:
[220 16 440] [NE]
Pressing the display mode key once displays additional information:
- Exact facing angle, from
-180° to +180° at North. 0° is South and +90° is East.
- World time, in
HH:MM format. To match the clock item, day starts at 6AM.
Colors indicate some events during the sunset (dusk), night, and sunrise (dawn):
18:00: Daytime ends and Sunset begins, Villagers go to their beds and sleep
18:32: Beds can be used and undead mobs no longer burn
19:11: Hostile mobs start spawning outdoors
04:48: Hostile mobs stop spawning outdoors
05:27: Beds can no longer be used, undead mobs begin to burn
06:00: Sunrise ends and Daytime begins, Players and Villagers awaken and rise from their beds
- The above timestamps are for clear/sunny weather.
Rains and Thunderstorms extend bed usage, hostile mob spawning and no burning periods, so they start earlier and end later.
- Biome human-friendly name, translated to your current game language
Example:
[220 16 440] [NE +132.5°] 18:32 Jungle
Pressing the key again displays more additional information:
- World day
- Exact world time in game ticks. A Minecraft Day lasts 24000 ticks.
- Real-life local time, in
HH:MM:SS format.
- Frames per second (FPS)
Example:
[220 16 440] [NE +132.5°] Day 123 18:32 T12542 21:52:45 Jungle 60 FPS
Press the key once more to disable the HUD, and again to cycle back to displaying simple information.
Installation
Using a pre-built jar:
- Install Fabric Loader in your Minecraft instance.
- Download the mod for your Minecraft version. Releases are found on
Github Releases,
Modrinth, and on
Curseforge.
- Save the downloaded
.jar file in the mods folder of your Minecraft instance,
by default ~/.minecraft in Linux and %APPDATA%/.mineraft in Windows
if you're using the official Minecraft Launcher from Microsoft.
- Similar instructions can be found in this Fabric tutorial
- Note: Besides the Fabric Loader itself, this mod requires the Fabric API Mod,
also available on CurseForge and
GitHub Releases,
so repeat the above steps for it.
- All the above can be greatly simplified using a launcher such as Prism Launcher
Compiling from source:
- Install Java JDK (not just the JRE!), preferably a modern release such as OpenJDK 21
- Clone this repository from Github
- Run
./gradlew build in the cloned repository directory.
sudo apt install default-jdk
git clone https://github.com/MestreLion/SimpleInfoHUD.git
cd SimpleInfoHUD
./gradlew build
The resulting .jars are found at ./build/libs, and can be used to install the mod.
To-Do List
- Use more colors:
- Biome, Temperature, etc
- Altitude: blue for Sea Level, yellow/cyan/red for top Gold, Diamonds, Lava Lakes, etc
- Week/Moon phase.
- Allow basic customization, such as HUD position, size and color.
- Config file to persist display mode.
- Automatic publish on Modrinth, CurseForge and Github releases via Github actions
- Branches for distinct major Minecraft versions.
Wont-Do List
-
Add a ton of features or in-game customization options. There are better mods for that, including MiniHUD. The idea of Simple Info HUD is to keep it simple, consise, and provide good defaults. Plug and play, no need to tinker with.
-
Add Light Level. The Light Level of the single block you're standing on is almost useless, and coloring that light level can be misleading as mob spawn mechanics are very complex. Such info simply does not belong to a mere HUD, but to a proper Overlay displayed on the blocks themselves, such as MiniHUD's Light Level overlay or a dedicated mod like Shedaniel's Light Overlay.
Speaking of MiniHUD...
Why not MiniHUD?
MiniHUD, an amazing and well-known Mod by Masa, offers a very similar funcionality plus a ton of other features.
So why Simple Info HUD even exists?
- First, Simple Info HUD predates MiniHUD. I've initially developed it for Minecraft
1.5.2 (yes 5, not 15!) in 2013, and MiniHUD debuted only in 2016.
- No support for aggregating different data in a single line. MiniHUD, by design, shows each information in its own line.
- No support for dynamic colors, such as Simple Info HUD's World Time changing colors throughout the day to indicate special events.
- No support for (correct) integer Coordinates. Using
%.0f to hide decimals will round the number, possily up, instead of properly truncating it down.
This means a coordinate of 1234.5 will be displayed as 1235, which is most likely not what you want.
This is a Java limitation as it has no formatting option to truncate a float to an int, so you need %.1f to show 1 decimal place as a workaround.
Simple Info HUD uses integers for position coordinates, just like F3, and displays 1234 as intended.
Contributing
Patches and Pull requests are very welcome, specially for features in the To-Do list. Bug reports and suggestions and comments too!
If you want to hack the code, the easiest way is to set up a development environment such as an IDE.
- Fabric has a great tutorial on setting up IntelliJ IDEA.
- You can also use any IDE of your choice, such as Microsoft Visual Studio Code, or none at all and use any bare text editor.
Credits and Disclaimer
This is a "reboot" of my first mod, made in 2013 for Minecraft 1.5.2/1.6.1.
It targeted ModLoader, possibly the oldest mod loader "platform", which Forge supported back then.
That ancient version is still available, for historical purposes, in the
modloader branch of this repository.
It served as the main reference when developing this updated version, check its
README for the original references and credits.
Created using Fabric's Template mod generator
Feel free to use, fork and contribute!
Copyright (C) 2024 Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. See <http://www.gnu.org/licenses/gpl.html>
评论 0
登录后参与评分
还没有评论,来抢沙发吧