FabricMC / fabric-loader

Fabric's mostly-version-independent mod loader.
Apache License 2.0
632 stars 269 forks source link

allow constructors as method reference entrypoints #982

Open rhysdh540 opened 1 month ago

rhysdh540 commented 1 month ago

now you can pretend to be forge by making your entrypoint your.package.YourClass::<init>!

not exactly the cleanest implementation ever but it seems to work on the test mod

modmuss50 commented 1 month ago

Whats the benefit of this? Just becuase forge does it doesn't mean its a good idea.

Nolij commented 1 month ago

He wants to make Zume smaller by merging the entrypoint classes for Forge and Fabric.

rhysdh540 commented 1 month ago

that wasn't my initial motivation for making this pull request; constructors not working was something I noticed a while ago. I realized the potential size benefits of it later.

as for why I opened this, I'm not really sure, I just thought it would be cool to have as a feature. do you have any other reasons/potential unwanted behavior that this could cause that would make it a bad idea?