maradotwebp / pax

📦 The MC modpack manager for professionals.
https://github.com/froehlichA/pax/releases/latest
MIT License
162 stars 3 forks source link

Mark mods as client/server only #22

Open maradotwebp opened 3 years ago

maradotwebp commented 3 years ago

Mark some mods as client/server only when installing. Requires a nice server exporter first, of course.

rlnt commented 3 years ago

This could be used for automatically creating serverpacks for a pack version. It would simply skip all the client mods automatically.

Badtz13 commented 3 years ago

I briefly looked into implementing this, but couldn't find a way to tell if mods were client or server only. I suppose it could be implemented as pax add --client <modname> but that seems a bit annoying. Is there somewhere I can find this data?

maradotwebp commented 3 years ago

Afaik theres no way to tell if a mod is client- or server-side just from the API, the user would have to enter that information themselves, probably something like ./pax mark appleskin --client-only which would set an installed mod as client- or serverside and save that information somewhere for later use.

Nevertheless I think we'll first need an exporter that doesn't export manifest.jsons, but direct .jar files. (#27)

hipsterjazzbo commented 2 years ago

This may be naive as I'm relatively new to modpack dev, but would something like this work:

zipgrep "net.minecraft.client" MODFILE.jar

If no results are returned, it's a server-only mod?

Dreaming-Codes commented 1 year ago

This may be naive as I'm relatively new to modpack dev, but would something like this work:

zipgrep "net.minecraft.client" MODFILE.jar

If no results are returned, it's a server-only mod?

Nope, or at least maybe but that's not what you need to detect... You need to detect whether is a client-only mod for making a server pack since server-only are also required for the internal server.