GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
226 stars 170 forks source link

Convert from ASM to Mixins #2192

Open ALongStringOfNumbers opened 6 months ago

ALongStringOfNumbers commented 6 months ago

What

Converts our ASM in the project to Mixins, for ease of maintainability, and hopefully fixing up some compat.

Mixins and MixinExtras is being pulled from MixinBooter specifically.

A new Package has been created, that being gregtech.mixins and after all ASM has been converted to Mixins, I am planning on moving GregTechLoadingPlugin into this package.

Where applicable, I am just calling the existing Hooks class from the Mixin. Although this can be changed.

For debugging purposes during this conversion, I have the gradle.properties option enableCoreModDebug set to true. This should definitely be set to false before merging. For those interested, this option outputs all transformed classes into run/CLASSLOADER_TEMP, and can be used to compare the code transformed by our ASM and by our Mixins. This does not currently work for inner classes.

Potential Compatibility Issues

Should be no compat issues, if everything is working correctly

IntegerLimit commented 6 months ago

Note on the NC Mixin/ASM: We implemented a proper fix in Nomi-Labs. Might want to pull that in to GT. (Made with help from @YoungOnionMC)

Mixin

Logic

Hope this helps!