CrosshairDist 回答了原版游戏从未明确解答的问题:我准星对准的东西有多远? 当你瞄准一个在可触及范围内的方块或实体时,准星下方会出现一条短线,显示类型(“Block”或“Entity”)以及从你的眼睛到该目标的精确距离,保留两位小数。
显示内容
Block 4.50m — 当准星击中方块面时。绿色文字。
Entity 3.56m — 当准星击中生物、动物或其他玩家时。橙色文字。
- 无显示 — 当你在瞄准空白空间时——没有干扰,无需测量时无 clutter。
距离是从你的眼睛位置到射线命中点的直线距离,因此靠近或后退时读数会平滑更新。
适用场景
- 建筑师 — 柱子高度、间隙宽度、桥梁跨度、红石对齐范围。
- 弓箭手 — 在精确射程内判断箭矢下坠,而非猜测。
- 地图制作者 — 选择精确的摄像机角度并记录场景。
工作原理
- 每帧读取
MinecraftClient.crosshairTarget 并计算从你的眼睛到命中点的距离。
- 通过 Fabric 的
HudRenderCallback 绘制——自动尊重 F1(隐藏 HUD)、暂停菜单和物品栏界面。
- 无需 Mixin,不产生服务器流量。完全客户端侧。
控制
兼容性
适用于 Minecraft 1.21.8、1.21.9、1.21.10 和 1.21.11(Fabric Loader 0.16+)。单个 JAR 文件支持所有四个版本——与 Fabric API 一起安装并放入你的 mods/ 文件夹。纯客户端侧;可在任何服务器上运行,零配置。
CrosshairDist answers a question the vanilla game never quite does: how far away is the thing I'm pointing at? While you aim at a block or entity within reach, a small line under your crosshair shows the kind ("Block" or "Entity") plus the exact distance from your eyes, to two decimal places.
What it shows
Block 4.50m — when the crosshair hits a block face. Green text.
Entity 3.56m — when the crosshair hits a mob, animal, or other player. Orange text.
- Nothing when you're aiming at empty space — no clutter when there's nothing to measure.
The distance is the straight-line distance from your eye position to the exact ray-hit point, so leaning closer or backing off updates the readout smoothly.
What it's good for
- Builders — pillar height, gap width, bridge spans, redstone alignment ranges.
- Archers — judge arrow drop at exact ranges instead of guessing.
- Map makers — pick precise camera angles and document scenes.
How it works
- Reads
MinecraftClient.crosshairTarget every frame and computes the distance from your eyes to the hit point.
- Drawn via Fabric's
HudRenderCallback — respects F1 (hide HUD), pause menus, and inventory screens automatically.
- No mixins, no server traffic. Fully client-side.
Controls
- J — toggle the readout on / off (default: on)
Compatibility
Works on Minecraft 1.21.8, 1.21.9, 1.21.10, and 1.21.11 (Fabric Loader 0.16+). One JAR for all four versions — install alongside Fabric API and drop into your mods/ folder. Pure client-side; works on any server, zero config.
评论 0
登录后参与评分
还没有评论,来抢沙发吧