CC: HUD Glasses
3d cube
将 ComputerCraft 的显示器戴在脸上。一副眼镜和一个特殊的调制解调器,让你熟悉的 monitor/term API 能够将抬头显示器(HUD)直接绘制在玩家的屏幕上。
helicopter hud with shadow
功能说明
- HUD 眼镜 — 佩戴于头盔槽位(或 Curios 饰品槽位)。绑定的调制解调器输出的内容将以全屏覆盖层的形式显示。
- HUD 调制解调器 — 一个 ComputerCraft 外围设备(
type = "hud_glasses")。像连接其他外围设备一样将其连接到计算机,并像操作显示器一样向其写入数据。
- 绑定机制 — 绑定关系存在于眼镜上。手持眼镜右键点击调制解调器即可完成绑定。将眼镜交给朋友,HUD 也会随之跟随。任意数量的玩家都可以观看同一个调制解调器。
local hud = peripheral.find("hud_glasses")
hud.setBackgroundColour(0) -- 透明背景
hud.setTextColour(colors.lime)
hud.setCursorPos(1, 1)
hud.write("Hello, HUD!")
如果你写过显示器程序,你就已经熟悉这个外围设备了。
特性
- 兼容显示器 API:支持 write、blit、clear、scroll、setCursorPos、setTextColour、setBackgroundColour、setPaletteColour、getSize 等函数。大多数显示器脚本无需修改即可运行。
- 透明背景 —
setBackgroundColour(0)(或在 blit 中使用 -)允许世界背景透出,使 HUD 叠加在游戏画面上而非完全遮挡它。
- 像素级 CC 字体 — 复用 CC: Tweaked 自身的字形表,因此所有 256 个字符(包括框线绘制、子像素块、箭头等)看起来都与真实终端完全一致。
- 运行时分辨率 — 可通过 Lua 调用
setSize(w, h),或在配置文件中设置默认值。单元格越少,文字越大。可选择网格映射到屏幕的方式:FIT(保持比例,黑边填充)、STRETCH(填满屏幕,可能变形)或 COVER(填满并裁剪溢出部分)。
- 共享屏幕 — 可将多副眼镜绑定到同一个调制解调器,所有人都能看到相同的显示内容。适用于团队状态板、基地警报和共享坐标。
- 随处放置 — 调制解调器可安装在任意方块表面(地板、墙壁、天花板),屏幕朝外。
- 便携式 HUD — 将口袋计算机与 HUD 调制解调器一起合成,即可获得 HUD 升级,随身携带显示界面。使用相同的
hud_glasses 外围设备;按住潜行键+右键点击已佩戴的眼镜即可将其绑定(普通右键点击仍会打开终端)。
- 单槽位集成 HUD + 末影调制解调器 — 口袋计算机只有一个升级槽位,因此可以合成 HUD 末影调制解调器(HUD 调制解调器 + 末影调制解调器)以适配口袋计算机:一个同时具备屏幕和无线电功能的外围设备。rednet 可在其上工作,
peripheral.find("hud_glasses") 也能找到它,且调制解调器部分支持跨维度通信。服务器可在配置中禁用该配方。
- 游戏内配置 — 可从模组列表中的“Config”按钮编辑设置,或绑定按键直接跳转至客户端设置。
- 切换按键 — 按 H 键隐藏或显示 HUD;设置会持久保存。
- 渲染优化 — 批量绘制和服务器端负载缓存确保即使在大尺寸、频繁更新的显示界面上,开销也保持在较低水平。
依赖要求
- NeoForge 1.21.1
- CC: Tweaked 1.119.0 或更高版本(必需)
可选整合
- Curios — 添加专用的眼镜饰品槽位,避免占用你的头盔槽位。同样兼容原版头盔槽位;无论哪种方式,眼镜都会在头部渲染。
- Create: Aeronautics / Sable — 绑定机制使用稳定的调制解调器 ID 和针对 Sable 的距离检测,因此当调制解调器位于飞行子层级内部时,HUD 仍能正常工作。Sable Companion 已包含在内,无需额外安装。
power armor hud with weapon
配置说明
服务器端 (hudglassescc-common.toml, 实时生效):
hudWidth (默认 80) — 默认网格宽度(字符数)
hudHeight (默认 28) — 默认网格高度(字符数)
maxRangeBlocks (默认 -1) — 调制解调器到玩家的最大距离(方块单位),-1 表示无限制
allowPocketHudEnderCraft (默认 true) — 是否允许合成 HUD 末影调制解调器。设为 false 将完全移除该配方;已拥有此升级的口袋计算机仍可正常使用
客户端 (hudglassescc-client.toml, 每个玩家独立):
hudEnabled (默认 true) — 渲染 HUD,可通过 H 键切换
hudFit (默认 FIT) — HUD 如何缩放以适应屏幕:FIT(保持比例,黑边填充)、STRETCH(填满,可能变形)、COVER(填满,裁剪溢出部分)
textShadow (默认 NONE) — 文本阴影样式:NONE / SHADOW / OUTLINE(实验性)
textShadowLayer (默认 OVER_BACKGROUND) — 阴影/轮廓是绘制在单元格背景之上还是之下(实验性)
fastGlyphRendering (默认 true) — 从缓存的字形绘制 HUD 文本,在大型 HUD 尺寸下速度更快。仅在与其他模组的文本渲染发生冲突时才关闭此项
状态
Beta 阶段。核心功能已完善且稳定,但在模组稳定过程中可能会出现粗糙之处和不兼容的变更。欢迎提交错误报告和反馈。
CC: HUD Glasses
3d cube
Wear a ComputerCraft monitor on your face. A pair of glasses and a special modem
let any computer draw a heads-up display straight onto a player's screen, using
the same monitor/term API you already know.
helicopter hud with shadow
What it does
- HUD Glasses — worn in the helmet slot (or a Curios slot). Whatever the bound
modem outputs is drawn as a full-screen overlay.
- HUD Modem — a ComputerCraft peripheral (
type = "hud_glasses"). Wire it to a
computer like any other peripheral and write to it like a monitor.
- Binding lives on the glasses. Right-click a modem with the glasses in hand and
they're bound to it. Hand the glasses to a friend and the HUD goes with them.
Any number of players can watch the same modem.
local hud = peripheral.find("hud_glasses")
hud.setBackgroundColour(0) -- transparent background
hud.setTextColour(colors.lime)
hud.setCursorPos(1, 1)
hud.write("Hello, HUD!")
If you've ever written a monitor program, you already know this peripheral.
Features
- Monitor-compatible API: write, blit, clear, scroll, setCursorPos,
setTextColour, setBackgroundColour, setPaletteColour, getSize, and more. Most
monitor scripts run unchanged.
- Transparent background — setBackgroundColour(0) (or
- in blit) lets the world
show through, so the HUD overlays the game instead of covering it.
- Pixel-perfect CC font — reuses CC: Tweaked's own glyph sheet, so all 256
characters (box-drawing, sub-pixel blocks, arrows) look exactly like a real
terminal.
- Runtime resolution — setSize(w, h) from Lua, or set defaults in the config.
Fewer cells means bigger text. Choose how the grid maps to the screen: FIT
(keep aspect, letterbox), STRETCH (fill the screen), or COVER (fill + crop).
- Shared screens — bind several glasses to one modem and everyone sees the same
display. Good for team status boards, base alarms, and shared coordinates.
- Place anywhere — the modem mounts on any block face (floor, wall, ceiling),
screen facing out.
- Portable HUD — craft a pocket computer together with a HUD Modem to give it the HUD
upgrade, and carry the display with you. Same hud_glasses peripheral; bind your worn
glasses to it with sneak + right-click (a plain right-click still opens the terminal).
- HUD + ender modem in one slot — a pocket computer only has one upgrade slot, so craft
a HUD Ender Modem (HUD Modem + Ender Modem) and fit it to the pocket: one peripheral
that is both screen and radio. rednet works on it, peripheral.find("hud_glasses") finds
it, and the modem half is interdimensional. Servers can turn the recipe off in config.
- In-game config — edit settings from the Mods list "Config" button, or bind a
key to jump straight to the client settings.
- Toggle key — press H to hide or show the HUD; the setting persists.
- Optimized rendering — batched draws and a server-side payload cache keep the
overhead low even for large, frequently-updated displays.
Requirements
- NeoForge 1.21.1
- CC: Tweaked 1.119.0 or newer (required)
Optional integrations
- Curios — adds a dedicated Glasses accessory slot so the glasses don't occupy
your helmet. Works with the vanilla helmet slot too; the glasses render on the
head either way.
- Create: Aeronautics / Sable — the binding uses a stable modem ID and a
Sable-aware distance check, so the HUD keeps working when the modem rides inside
a flying sub-level. Sable Companion is bundled, so there's nothing extra to
install.
power armor hud with weapon
Configuration
Server (hudglassescc-common.toml, applied live):
- hudWidth (default 80) — default grid width in characters
- hudHeight (default 28) — default grid height in characters
- maxRangeBlocks (default -1) — max modem-to-player distance in blocks, -1 means
unlimited
- allowPocketHudEnderCraft (default true) — whether the HUD Ender Modem can be crafted.
false removes the recipe entirely; pockets that already have the upgrade keep working
Client (hudglassescc-client.toml, per-player):
- hudEnabled (default true) — render the HUD, toggle with the H key
- hudFit (default FIT) — how the HUD scales to the screen: FIT (keep aspect,
letterbox), STRETCH (fill, may distort), COVER (fill, crops overflow)
- textShadow (default NONE) — text shadow style: NONE / SHADOW / OUTLINE
(experimental)
- textShadowLayer (default OVER_BACKGROUND) — whether the shadow/outline is drawn over or
under the cell backgrounds (experimental)
- fastGlyphRendering (default true) — draw HUD text from cached glyphs, much faster at
large HUD sizes. Turn off only if another mod's text rendering conflicts with it
Status
Beta. Core features are in and stable, but expect rough edges and breaking
changes while the mod settles. Bug reports and feedback are welcome.
评论 0
登录后参与评分
还没有评论,来抢沙发吧