mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-26 09:13:05 +00:00
Don't add classpath mods to FML reparseable coremod collection
As proposed in https://github.com/SpongePowered/Mixin/issues/207 Fixes mods on the class path containing mixins not getting loaded as mods in a 1.7.10 development environment. Background information: Discovery of Forge mods roughly happens in the following 2 steps: 1. `findClassPathMods`: Discover Forge mods on the class path which are not in the coremod list or the reparseable coremod list. 2. `findModDirMods`: Discover Forge mods that are in the mod directory, or specified as *extra mods* using `--mods`. It appears that the purpose of the reparseable mod list is to prevent a mod from being discovered in both of the steps. This would happen with extra mods containing both a coremod and a Forge mod, since they get injected into the class path during coremod discovery (but since they get marked as reparseable, this is avoided.) Mixin needs to make sure the mod gets discovered in exactly one of the steps. We can achieve this by only adding it to the reparseable list if it's not on the boot class path. This causes only extra mods to get added.
This commit is contained in:
1 parent
5dc0ee5963
commit
a8217ef280
1 file changed
+2
-2
+2
-2
@@ -195,7 +195,7 @@ public class MixinPlatformAgentFMLLegacy extends MixinPlatformAgentAbstract impl
|
||||
if (this.handle.getAttribute(MixinPlatformAgentFMLLegacy.MFATT_COREMODCONTAINSMOD) != null) {
|
||||
if (this.isIgnoredReparseable()) {
|
||||
MixinPlatformAgentAbstract.logger.debug(
|
||||
"Ignoring request to add {} to reparseable coremod collection - it is a deobfuscated dependency", this.fileName);
|
||||
"Ignoring request to add {} to reparseable coremod collection - it is on the class path", this.fileName);
|
||||
return;
|
||||
}
|
||||
this.addReparseableJar();
|
||||
@@ -203,7 +203,7 @@ public class MixinPlatformAgentFMLLegacy extends MixinPlatformAgentAbstract impl
|
||||
}
|
||||
|
||||
private boolean isIgnoredReparseable() {
|
||||
return this.handle.toString().contains("deobfedDeps");
|
||||
return System.getProperty("java.class.path").contains(this.fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user