Skip to content

1.1.1 — 修复残留 staged jar 导致的 OptiFine 界面点击失效

Choose a tag to compare

@Kynarain Kynarain released this 30 Nov 13:46
· 4 commits to main since this release

1.1.1: remove stale generated OptiForge-*-classes.jar files

Symptom: in OptiFine''s Video Settings on 26.3 every button (Quick Info / Details / Quality / Animations / Performance
/ Vanilla / Other / Done) did nothing.

What the click path looked like after inspection: IGuiScreenOF.mouseClicked is an interface default method, no class in
the hierarchy overrides it (Screen, Forge''s Screen and OptionsSubScreen do not), the method body is byte-identical in
OptiFine 26.2 and 26.3, and the buttons are registered through addRenderableWidget so they are in children(). In short,
the dispatch itself was fine.

Root cause: after upgrading, the instance''s mods/ folder still contained the staged jar from the previous OptiForge
version (OptiForge-1.0.6-classes.jar) next to the current one. OptiFine''s own GUI/renderer classes were loaded from the
stale jar while the patched game classes came from the current pack, so the two halves disagreed: the screen rendered but
clicks went nowhere. Cleaning mods/ and rebuilding the pack fixed it.

Fix: when staging the generated classes jar, OptiForge now deletes every other mods/OptiForge-*-classes.jar and records
what it removed in optiforge/diagnose.txt.

Kept from the investigation: an opt-in GUI click probe. With optiforge/debug-gui.txt present (or
-Doptiforge.debugGui=true) the probe is compiled into IGuiScreenOF.mouseClicked and appends one line per click to
optiforge/gui-debug.txt - PCL does not capture mod stdout into latest.log, so a file is the reliable channel.

32 per-version files, all readable and SHA-256 distinct.