Shadow Nametag Fix
在使用光影时,你是否见过悬浮在空中的旋转、重复的名称标签?这个小型客户端模组可以移除它。
问题所在
使用 Iris 光影(包括 Complementary Reimagined、Euphoria Patches、BSL 等许多其他光影)时,游戏会在阴影渲染阶段(从太阳的视角)渲染实体——包括它们的名称标签。光柱等效果随后会将该阴影缓冲区投影到你的屏幕上,将名称标签作为旋转的“幽灵”副本拖拽到真实名称标签旁边。
常见的解决方法是在每个光影包的设置中禁用玩家阴影(PLAYER_SHADOW=-1)——但这需要为每个包和每次更新重新操作,并且你会失去阴影效果。
此模组的作用
Shadow Nametag Fix 仅在做 Iris 绘制阴影渲染阶段时跳过名称标签的渲染。名称标签永远不会进入阴影缓冲区,因此没有东西可被投影——“幽灵”消失了。
- ✅ 适用于任何光影包 —— 无需维护每个包的设置
- ✅ 能够应对光影包切换和更新
- ✅ 保留你的阴影 —— 仅跳过名称标签,不跳过玩家本身
- ✅ 关闭光影时无效 —— 完全原版行为
- ✅ 轻量级:单个 Mixin,无配置,无额外依赖
兼容性
- Minecraft: 1.20.1
- 加载器: Fabric
- Iris: 可选。模组通过反射查找 Iris,因此不需要安装 Iris,且不会因 Iris 更新而失效。
- 仅限客户端 —— 服务器端不需要。
工作原理(技术细节)
一个 Mixin 注入到 EntityRenderer#renderLabelIfPresent 中,每当 ShadowRenderingState.areShadowsCurrentlyBeingRendered() 报告阴影渲染阶段处于活动状态时便取消渲染。Iris 通过反射访问,因此没有硬编译时依赖。
许可证
MIT —— 你可以随意使用,包括将其打包进整合包。
Shadow Nametag Fix
Ever seen a rotated, duplicated nametag floating in the air when playing with shaders? This tiny client-side mod removes it.
The problem
With Iris shaders (Complementary Reimagined, Euphoria Patches, BSL, and many others), the game renders entities — including their nametags — during the shadow pass, from the sun's point of view. Effects like light shafts then project that shadow buffer back onto your screen, dragging the nametag along as a rotated "ghost" copy next to the real one.
The common workaround is to disable the player shadow (PLAYER_SHADOW=-1) in each shaderpack's settings — but that has to be redone for every pack and every update, and you lose your shadow.
What this mod does
Shadow Nametag Fix simply skips nametag rendering while Iris is drawing the shadow pass. The nametag never enters the shadow buffer, so there's nothing to project — the ghost is gone.
- ✅ Works with any shaderpack — no per-pack settings to maintain
- ✅ Survives shaderpack switches and updates
- ✅ Keeps your shadow — only the nametag is skipped, not the player
- ✅ Does nothing when shaders are off — fully vanilla behavior
- ✅ Lightweight: a single Mixin, no config, no extra dependencies
Compatibility
- Minecraft: 1.20.1
- Loader: Fabric
- Iris: optional. The mod finds Iris by reflection, so it doesn't require Iris to be installed and won't break if Iris updates.
- Client-side only — not needed on the server.
How it works (technical)
A Mixin injects into EntityRenderer#renderLabelIfPresent and cancels it whenever ShadowRenderingState.areShadowsCurrentlyBeingRendered() reports the shadow pass is active. Iris is accessed reflectively, so there's no hard compile-time dependency.
License
MIT — do whatever you like, including bundling it in modpacks.
评论 0
登录后参与评分
还没有评论,来抢沙发吧