GroovyMC / GroovyModLoader

Neo/Forge Groovy mod loader
MIT License
3 stars 2 forks source link

Crash on launch in production due to `PackMCMetaVersionsGetter` failing #9

Closed PaintNinja closed 1 year ago

PaintNinja commented 1 year ago

https://mclo.gs/sobKI41

https://github.com/Matyrobbrt/GroovyModLoader/blob/main/src/mod/groovy/com/matyrobbrt/gml/mod/PackMCMetaVersionsGetter.groovy#L19

Using a simple hard-coded values fixes the issue.

Matyrobbrt commented 1 year ago

This issue is caused by https://github.com/Matyrobbrt/GroovyModLoader/blob/main/src/mod/groovy/com/matyrobbrt/gml/mod/PackMCMetaVersionsGetter.groovy not getting remapped.

PaintNinja commented 1 year ago

How do you propose we fix this? @CompileDynamic might work but would be slower, or we could simply hardcode the values and manually change them each MC release as needed. Or is this a bug with the mod sourceset unexpectedly not being remapped?

Matyrobbrt commented 1 year ago

Neither options are going to fix it, the property syntax uses dynamic calls, and the metaclass remapping is not yet set up that early. The fix is to make that class use Java.

PaintNinja commented 1 year ago

https://github.com/Matyrobbrt/GroovyModLoader/commit/98c127c9f514d13a2ae0ddaa46b1f01421a47abd has fixed it in production, but now crashes in dev.