GL4ES Stencil Fix
一个小型 Forge 模组,修复了在移动端 Minecraft 启动器(使用 GL4ES 或 Krypton Wrapper 等 OpenGL 包装器)上影响 Create 的崩溃问题。
问题所在
在移动端 Android 启动器(如 ZalithLauncher、PojavLauncher、FCL 等)中,游戏在加载期间会崩溃,错误信息为:
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT (GL4ES / GLES 2.0)
GL_FRAMEBUFFER_UNSUPPORTED (Krypton Wrapper / GLES 3.x)
崩溃的原因是 Create/Ponder 调用了 RenderTarget.enableStencil(),该调用试图将模板缓冲区附加到现有的 FBO 上。移动端 OpenGL 包装器无法处理此操作,导致 Forge 抛出致命的 RuntimeException。
修复方案
本模组使用 Forge Coremod(ASM 字节码转换器),在类加载时运行,将 enableStencil() 替换为空操作(no-op)。由于不再执行模板缓冲区调用,因此不会发生崩溃。
如果补丁成功应用,日志中将显示以下行:
"""
[GL4ESFix] SUCCESS: RenderTarget.enableStencil() replaced with no-op RETURN.
"""
兼容性
- Minecraft: 1.20.1
- Forge: 47.x
- Create: 0.5.x 和 6.0.x(所有 1.20.1 版本)
- 启动器: ZalithLauncher、PojavLauncher、FCL 以及任何基于 GL4ES 的启动器
- 仅客户端 — 无需在服务器上安装
副作用
模板缓冲区用于 Create/Ponder 中 Ponder 教程查看器的 UI 裁剪。启用此修复后,该裁剪效果将被禁用,这可能导致 Ponder 屏幕中出现轻微的视觉伪影(UI 元素略微溢出其边界)。
正常游戏、机器、装置及其他所有功能均完全不受影响。
安装
将 jar 文件放入 .minecraft/mods/ 文件夹中,与 Create 放在一起即可。无需额外配置。
GL4ES Stencil Fix
A tiny Forge mod that fixes a crash affecting Create (机械动力) on mobile Minecraft launchers that use OpenGL wrappers like GL4ES or Krypton Wrapper.
The Problem
On mobile Android launchers (ZalithLauncher, PojavLauncher, FCL, etc.), the game crashes during loading with:
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT (GL4ES / GLES 2.0)
GL_FRAMEBUFFER_UNSUPPORTED (Krypton Wrapper / GLES 3.x)
The crash happens because Create/Ponder calls RenderTarget.enableStencil(), which tries to attach a stencil buffer to an existing FBO. Mobile OpenGL wrappers can't handle this operation, causing Forge to throw a fatal RuntimeException.
The Fix
This mod uses a Forge Coremod (ASM bytecode transformer) that runs at class-load time to replace enableStencil() with a no-op. The stencil buffer call is never made, so the crash never occurs.
If the patch is applied successfully, you'll see this line in the log:
"""
[GL4ESFix] SUCCESS: RenderTarget.enableStencil() replaced with no-op RETURN.
"""
Compatibility
- Minecraft: 1.20.1
- Forge: 47.x
- Create: 0.5.x and 6.0.x (all 1.20.1 versions)
- Launchers: ZalithLauncher, PojavLauncher, FCL, and any GL4ES-based launcher
- Client-side only — does not need to be installed on servers
Side Effects
The stencil buffer is used by Create/Ponder for UI clipping in the Ponder tutorial viewer. With this fix, that clipping effect is disabled, which may cause minor visual artifacts (UI elements slightly overflowing their bounds) in the Ponder screen.
Normal gameplay, machines, contraptions, and all other features are completely unaffected.
Installation
Place the jar in your .minecraft/mods/ folder alongside Create. No additional configuration required.
评论 0
登录后参与评分
还没有评论,来抢沙发吧