sp614x / optifine

1.77k stars 419 forks source link

[1.15.2 Forge coremods] Forge coremods cannot transform OptiFine classes #3898

Open Exopandora opened 4 years ago

Exopandora commented 4 years ago

Description of Issue

If a coremod tries to change a class file that has been overriden by optifine, the coremod will inject into vanilla code which in turn gets overriden by OptiFine.

Steps to Reproduce

  1. Create a simple coremod and dump the bytecode at runtime of a optifine-modified class (i.e. GameRenderer#renderWorld). You can use this for dumping GameRenderer#renderWorld at runtime to the log file.

OptiFine Version

OptiFine 1.15.2 HD U G1 pre16

Installation Method

(Extracted) jar in mods folder

Fabric/Forge Version

Forge 1.15.2-31.1.63

Other Installed Mods

None

Additional Information

Expected bytecode to modify by coremod (Modified OptiFine version of GameRenderer#renderWorld): https://pastebin.com/uFXfGy0s

Actual bytecode dump of method at runtime (GameRenderer#renderWorld): https://pastebin.com/zBNxxb8s

The actual bytecode matches vanilla code.

ZekerZhayard commented 4 years ago

It may be a known issue: cpw/modlauncher#37