LlamaLad7 / MixinExtras

Companion library to SpongePowered Mixin with many custom injectors for a more expressive experience.
MIT License
304 stars 17 forks source link

JiJ-able fabric mod version #2

Closed altrisi closed 2 years ago

altrisi commented 2 years ago

Hi!

Amazing library first of all, looks really useful!

Do you think it'd be a good idea to have a JiJ-able fabric mod (maybe as a sub project/module so the main code doesn't depend on it) so if other mods can directly JiJ it, there's no need to load the same library multiple times in different locations (via shadow) and the initialization is also handled by it? That'd also make it more easily version-able and have a proper entry as a mod.

Just a suggestion that crossed my mind, what do you think?

LlamaLad7 commented 2 years ago

You can already JiJ it on fabric. Simply add include around it in your build script and loom will generate a dummy fabric.mod.json for it. If that doesn't work let me know, but I tested that when developing it, including with multiple versions bundled by different mods, and everything seemed to work fine.

altrisi commented 2 years ago

Yeah ik it works, just wanted to suggest an official one so it's consistent across mods, can have extra metadata, and handle initialization by itself if wanted too.

LlamaLad7 commented 2 years ago

Personally I'm not sure I see the benefits as outweighing the desire not to have platform-specific code. If I do ever need to store extra metadata, chances are it wouldn't be fabric-specific anyway, so I'd still need my own system to do so. The only real benefit would be not having to initialize it yourself, but to be honest I don't think that's enough of a pain to warrant publishing and maintaining lots of platform-specific artifacts.

altrisi commented 2 years ago

I'll close the issue then

LlamaLad7 commented 1 year ago

Kind of changed my mind so there's a fabric-specific artifact as of 0.2.0-beta.5