PatchworkMC / patchwork-patcher

Patches Forge mod jars, allowing them to be loaded by Fabric
GNU Lesser General Public License v3.0
315 stars 33 forks source link

Support multiple mods in one jar #4

Closed TheGlitch76 closed 4 years ago

TheGlitch76 commented 4 years ago

This PR adds support for loading multiple @Mod classes in a single jar, along with actually showing mods besides the first in ModMenu. The second part does not work in development environments because loader doesn't load jar-in-jar mods for some reason.

Fabric does not support having multiple mods in one manifest. To get around this, Patchwork generates a dummy mod jar with a converted manifest for each mod besides the first one (the 'parent'). These dummy mods do not contain initailizers, mixins, or any classes. Instead, all of this logic is done only in the parent. This PR will be followed up by one to Runtime that adds a test mod workspace.

UpcraftLP commented 4 years ago

The second part does not work in development environments because loader doesn't load jar-in-jar mods for some reason.

need to set minecraft#extractJars to true in your gradle buildscript, then refresh