altrisi / FastOpenLinksAndFolders

A lightweight mod to make the game not block when opening a chat link, a screenshot or the resourcepacks or datapacks folder.
https://www.curseforge.com/minecraft/mc-mods/fastopenlinksandfolders
GNU Lesser General Public License v3.0
9 stars 0 forks source link

Forge support #2

Open altrisi opened 2 years ago

altrisi commented 2 years ago

On curseforge, multiple people have asked for Forge support, three people already, last time being just 3 days ago.

I already considered Forge support could be a thing at the start, but didn't think people would actually want it, I didn't fully either tbh.

To get it:

Ideally, I'd like to get a single jar release for both loaders, that wouldn't bloat file size given I've made updates just to reduce it and it would be weird to up it now.

I can't use architectury because they don't support the Eclipse IDE, and another multi-loader gradle thing I found also doesn't support it.

Again ideally, I'd like to not start the entire forge machinery on my machine just for this mod, given when I did it last time, I remember it used a lot of space. I may have to do it though.

Issues I have found while investigating:

My current idea to get this done while checking all the above and with the issues in mind is to make the copy of the mixin and manually remap it to srg using a tool like recaf. Then create the annotated class by faking the annotation class with the only required field, and finally creating the mods.toml file with metadata. Refmap and icon can be shared, given it's currently empty, but it'll need a different mixin json file that points to the remapped mixin.

After that testing will be just loading the mod and seeing what happens. Worse thing will be checking compatibility with different forge versions, given I believe forge doesn't include mixin in all of them, and I think they also have different mod formats in different versions.

As to how that'd be in the repo to assert it's still open source: I'd upload the annotated class and the forge files to a forge folder in the repo root and provide instructions to create the final JAR.

altrisi commented 2 years ago

Seems like I also need a pack.mcmeta :pain:.