Community listing page, reviews here may not be monitored by the author.
YES_BSL
No reviews yet
Fixes the semi-transparent flickering that BSL Shaders causes on Yes Steve Model and other custom-render-pipeline models.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
YES BSL — BSL Shaders × Yes Steve Model Fix
Client-side only | Minecraft 1.21 | NeoForge | MIT
Fixes the semi-transparent flickering that BSL Shaders causes on models drawn by native / custom render pipelines — currently validated against Yes Steve Model (YSM), covering both the player model and the first-person hand.
Not affiliated with BSL Shaders, Iris or Yes Steve Model.
The symptom
With BSL Shaders and Advanced Materials enabled, some models appear half-transparent and flicker as the camera moves. YSM's player model and first-person hand are the known cases.
Nothing is broken in the model, and nothing is broken in YSM. The shaderpack is sampling the wrong part of the texture.
Why it happens
BSL enables parallax occlusion mapping (POM) under Advanced Materials — and this is the part that matters — it uses the parallax-corrected coordinate to sample the model's own texture:
if the "skip parallax" flag is not set:
newCoord = parallax(originalTexCoord, ...)
modelColor = texture(modelTexture, newCoord) <- no longer the original texcoord
newCoord is derived from vTexCoord / vTexCoordAM, which come from OptiFine / Iris
conventions around mc_midTexCoord and at_tangent.
| Geometry source | Who writes the vertices | Extended attributes correct? | Result |
|---|---|---|---|
| Standard MC models (blocks, vanilla mobs, held items) | BufferBuilder |
✅ Iris' MixinBufferBuilder fills them every 4 vertices |
POM mapping holds — fine |
| YSM and similar mods | native code writing IrisVertexFormats.ENTITY memory directly |
❌ values do not satisfy that mapping | newCoord drifts away from the real texCoord |
So albedo ends up sampling the wrong region of the atlas. These model textures are tightly
packed and full of blank pixels — and blank pixels' alpha is discarded by alpha test:
- it looks semi-transparent (blank areas punched out),
- and the offset changes every frame with the view, so it flickers.
A ready-made control experiment. BSL reserves a dedicated category for the map item (id
400), because a map is a flat texture that cannot survive POM either. Holding a map makes the arm render perfectly, while an empty hand flickers — and both show the same YSM hand model. The only difference is that id. That alone pins POM as the culprit.
The fix
While the target geometry is being rendered, make Iris report the id that the shaderpack itself reserved for "skip normals and parallax".
There are two fully independent paths — the same geometry uses a different variable in a different program:
| Render target | program | Predicate | Shaderpack escape hatch |
|---|---|---|---|
| Player model | gbuffers_entities |
entityId == 10100 |
entity-side "skip normals / parallax" |
| First-person hand | gbuffers_hand |
heldItemId / 100 == 4 |
item-side "map" category (id 400) |
Why override on read rather than on write. Iris also writes currentEntity at the same
spot. If this mod also wrote it, whoever ran first would depend on Mixin application order —
unreliable. Overriding at read time is order-independent: the read happens during rendering,
when the context already points at the object being drawn.
Why it will not misfire.
- Entity path: the mod does not blindly trust
10100. It reads the shaderpack's actual mapping table at runtime and only activates when the pack genuinely follows BSL's convention. With any other shaderpack the fix simply does not engage. - Hand path: the id is forged only when the hand is empty; holding an item keeps the true
value. In BSL,
heldItemIdis only actually read in three places, and forging400is exactly equivalent to the real0in all three (the colour-light data bits of400are00).
Performance
CapturedRenderingState.getCurrentRenderedEntity() is called per vertex, so the hot path is
compressed to a single volatile int read:
final int overrideId = EntityIdOverride.activeOverrideId;
if (overrideId >= 0) { cir.setReturnValue(overrideId); }
When not rendering a target — i.e. most drawing: blocks, mobs, particles, GUI — that one read is the entire cost. No reflection. Measured difference with the mod installed: about 1 FPS, well inside noise.
Installation
- Minecraft 1.21 with NeoForge;
- put
YES_BSL-1.0.0.jarinto.minecraft/mods/(orversions/<name>/mods/with version isolation); - done.
Client only. Nothing is needed on the server, and the server having it or not changes nothing.
Dependencies — both optional; if one is missing that part simply does not engage, it never crashes:
| Mod | Version | Note |
|---|---|---|
| Iris | 1.8+ | required in practice — without a shader loader there is nothing to fix |
| Yes Steve Model | 2.x | what this build is validated against |
Startup log:
[YES-BSL] 已就绪:渲染目标模型时会把 iris 报告的 id 映射到光影包预留的 Skip 类别(entityId=10100 / heldItemId=400)。
Configuration
config/yes_bsl.properties is generated on first launch:
| Key | Default | Meaning |
|---|---|---|
enabled |
true |
master switch; false makes the mod fully inert (= uninstalled) |
affectsAllEntities |
false |
also apply to non-player entities — useful when adapting another mod |
skipEntityId |
10100 |
the shaderpack's reserved category id for "not suitable for parallax" |
Two different strictness levels for injection failure
This mod ships two mixin configs and treats failure deliberately differently:
| Config | Target | On failure |
|---|---|---|
yes_bsl.mixins.json |
Minecraft's own EntityRenderDispatcher |
hard error (required=true) |
yes_bsl.iris.mixins.json |
Iris internals | silent no-op (required=false) |
The first is intentional: the mod's entire function hangs off that one point, and the target signature is very stable within a Minecraft major version. If it ever stops matching, a clear error is far better than silently doing nothing. The second is the opposite — Iris internals change more often, and a shader-related failure should never take the game down.
If you see a Mixin error mentioning
EntityRenderDispatcher, this build is not compatible with your Minecraft version. Remove it or wait for an updated build.
Reusing this for other mods
The skeleton is decoupled from YSM, so adapting to a new target is normally a single
predicate — either TargetDetector#isTargetEntity (entity path) or
HandMaterialOverride#shouldReportHeldItemId (held-item path). For a different shaderpack,
check which id its entity.properties / item.properties assigns to "skip normals and
parallax" and put it in skipEntityId.
The "verify the pack's actual mapping" step must be kept — it is what stops the mod from misfiring on shaderpacks that use a different id convention. Full guide in the project README.
License
MIT — free to use, modify and distribute, attribution only.
This project contains no third-party code or assets and is not affiliated with, nor endorsed by, the projects below.
| Project | License | Relation |
|---|---|---|
| BSL Shaders | All Rights Reserved | not included, not modified, not redistributed; the mod only changes the id Iris reports |
| Iris | LGPL-3.0 | referenced by class name via @Mixin(targets=...) only — no code copied |
| Yes Steve Model | All Rights Reserved | not decompiled, not modified, not bundled; used only to detect whether it is loaded |
Thanks to Capt Tatsu (BSL Shaders) — this mod depends entirely on the skip category he
reserved in entity.properties / item.properties, and on the carefully chosen 400 whose
colour-light bits are 00, which is what makes forging it side-effect free — and to the
Iris team for a clean id-mapping API and injection points.
The code is supervised by DeepSeek.
YES BSL —— BSL 光影 × YSM 兼容修复
纯客户端模组 | Minecraft 1.21 | NeoForge | MIT 开源
解决 BSL Shaders 开启 Advanced Materials 后,某些由 native / 自定义渲染管线写入顶点的 模型出现 半透明闪烁 的问题。当前针对 Yes Steve Model (YSM) 验证, 覆盖玩家模型与第一人称手模。
与 BSL Shaders、Iris、Yes Steve Model 均无隶属关系。
现象
开启 BSL 的 Advanced Materials 后,部分模型在转动视角时呈现 半透明并闪烁。 已知案例是 YSM 的玩家模型与第一人称手模。
模型本身没坏,YSM 也没坏 —— 是光影包采样到了贴图的错误区域。
原理
BSL 在 Advanced Materials 下启用视差贴图(POM),并且 —— 这一点才是关键 —— 它用视差求得的坐标去采样模型贴图本身:
若 未命中"跳过视差"标记:
偏移坐标 = 视差计算(原始纹理坐标, ...)
模型颜色 = 读取模型贴图(偏移坐标) ← 不再是原始纹理坐标
newCoord 由 vTexCoord / vTexCoordAM 推导,二者又来自 OptiFine / Iris 对
mc_midTexCoord 与 at_tangent 的语义约定。
| 几何体来源 | 顶点由谁写入 | 扩展属性是否正确 | 结果 |
|---|---|---|---|
| MC 标准模型(方块、原版生物、手持物品) | BufferBuilder |
✅ Iris 的 MixinBufferBuilder 每 4 个顶点计算一次 |
POM 映射成立,正常 |
| YSM 等模组模型 | native 直接按 IrisVertexFormats.ENTITY 写内存 |
❌ 取值不满足该映射前提 | newCoord 偏离真实 texCoord |
于是 albedo 采样到贴图 错误的区域。这类模型贴图布局紧凑、空白像素很多,而
空白像素的 alpha 会被 alpha test 丢弃:
- 于是看起来半透明(空白处被抠掉了);
- 偏移量随视角每帧变化,于是闪烁。
一个现成的对照实验。 BSL 为地图这个物品单独预留了一个类别(id
400)—— 因为地图是平面贴图,同样经不起 POM。 手持地图时手臂完全正常,空手时手模闪烁,而两者显示的是同一份 YSM 手模。 唯一差异就是这个 id —— 仅凭这一条就能锁定 POM 是元凶。
修复方式
在渲染目标几何体期间,让 Iris 对外报告光影包自己预留的 "跳过法线与视差" 类别值。
这里有两条完全独立的路径 —— 同一个几何体,在不同 program 里判据完全不同:
| 渲染对象 | program | 判据 | 光影包逃生舱 |
|---|---|---|---|
| 玩家模型 | gbuffers_entities |
entityId == 10100 |
实体侧的"跳过法线与视差"类别 |
| 第一人称手模 | gbuffers_hand |
heldItemId / 100 == 4 |
物品侧的"地图"类别(id 400) |
为什么是"读取时覆盖"而不是"写入时改写"。 Iris 也在同一位置写 currentEntity。
若本模组也去改写,谁先谁后取决于 Mixin 的应用顺序,不可靠。改为在读取时覆盖则与顺序无关 ——
读取发生在渲染过程中,此时上下文恰好指向被渲染的对象。
为什么不会误伤。
- 实体侧:不硬编码盲信
10100,而是运行时读取光影包真实的映射表, 只有当它确实遵循 BSL 这套约定时修复才生效。换成别的光影包会自动不生效。 - 手模侧:只在空手时伪造,持有物品时保持真值。全 BSL 中
heldItemId真正被使用的 只有三处,而空手时伪造400与真值0完全等价(400的彩色光数据位恰好是00)。
性能
CapturedRenderingState.getCurrentRenderedEntity() 会按顶点被调用,因此热路径被压到最省:
final int overrideId = EntityIdOverride.activeOverrideId;
if (overrideId >= 0) { cir.setReturnValue(overrideId); }
不参与渲染时(绝大多数绘制:方块、生物、粒子、GUI),代价仅为这一次 volatile 读。 无反射。实测与未安装时相差约 1 FPS,属浮动误差范围。
安装
- Minecraft 1.21 + NeoForge;
- 把
YES_BSL-1.0.0.jar放进.minecraft/mods/(版本隔离时是versions/<版本名>/mods/); - 完成。
只需要装在客户端。 服务器不需要,装不装也没有区别。
依赖(均为可选,缺失时对应部分自动失效,不会崩溃):
| 模组 | 版本 | 说明 |
|---|---|---|
| Iris | 1.8+ | 实际必需 —— 没有光影加载器就没有要修的东西 |
| Yes Steve Model | 2.x | 当前针对它验证 |
启动后日志中应出现:
[YES-BSL] 已就绪:渲染目标模型时会把 iris 报告的 id 映射到光影包预留的 Skip 类别(entityId=10100 / heldItemId=400)。
配置
首次启动生成 config/yes_bsl.properties:
| 键 | 默认 | 作用 |
|---|---|---|
enabled |
true |
总开关;false 时完全惰性(等价于卸载本模组) |
affectsAllEntities |
false |
是否也作用于非玩家实体(为其它模组适配时可打开验证) |
skipEntityId |
10100 |
光影包为"不适合视差贴图的实体"预留的类别 id |
关于「注入失败」的两种不同严格程度
本模组有两个混入配置,对失败的态度刻意不同:
| 配置 | 目标 | 失败的后果 |
|---|---|---|
yes_bsl.mixins.json |
Minecraft 自己的 EntityRenderDispatcher |
直接报错(required=true) |
yes_bsl.iris.mixins.json |
Iris 的内部类 | 静默失效(required=false) |
前者是刻意的:本模组的唯一功能就挂在这一处,而靶点签名在大版本内非常稳定。 一旦它对不上,明确报错远比"悄悄什么都不做"更好排查。 后者则相反 —— Iris 内部结构变动更频繁,且光影相关的失败不该拖垮游戏。
若你看到
EntityRenderDispatcher相关的 Mixin 报错,说明本模组与该 Minecraft 版本不兼容, 请先移除它,或等待适配版本。
为其它模组适配
骨架与 YSM 解耦,适配新目标通常只需要改一处判定 —— 要么是
TargetDetector#isTargetEntity(实体路径),要么是
HandMaterialOverride#shouldReportHeldItemId(手持物路径)。换光影包则需确认它的
entity.properties / item.properties 里"跳过法线与视差"对应哪个编号,再填进 skipEntityId。
务必保留"实际映射校验"这一步 —— 它保证只有当光影包真的把探针实体映射到该编号时修复才生效, 去掉就可能误伤使用其它 id 约定的光影包。完整指引见项目 README。
许可
MIT —— 可自由使用、修改、分发,仅需保留署名。
本项目不包含任何第三方的代码或资源,与下列项目无隶属关系,也不代表它们的立场。
| 项目 | 协议 | 本项目的关系 |
|---|---|---|
| BSL Shaders | All Rights Reserved | 不含、不修改、不再分发其任何代码或资源;仅调整 Iris 对外报告的 id |
| Iris | LGPL-3.0 | 仅通过 @Mixin(targets=...) 引用其公开类名,未复制其代码 |
| Yes Steve Model | All Rights Reserved | 不反编译、不修改、不内嵌;仅判断 mod 是否加载 |
致谢 Capt Tatsu(BSL Shaders)—— 本模组完全依赖他在 entity.properties /
item.properties 中预留的跳过类别,以及 400 这个精心设计的编号(彩色光数据位为 00,
使伪造它不产生副作用);以及 Iris 团队提供的规范注入点与清晰的 id 映射 API。
代码由 DeepSeek 监修。
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources