mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 10:34:49 +00:00
Rescan mod packages where there was a possible mod identified to try and make sure we load it. Fixes Matmos r16
This commit is contained in:
1 parent
9d812f12cc
commit
a697d043fc
2 files changed
+22
-1
No files matched your search
@@ -25,6 +25,11 @@ public class ModContainerFactory
|
|||||||
FMLLog.fine("Identified a BaseMod type mod %s", className);
|
FMLLog.fine("Identified a BaseMod type mod %s", className);
|
||||||
return new ModLoaderModContainer(className, modSource, modParser.getBaseModProperties());
|
return new ModLoaderModContainer(className, modSource, modParser.getBaseModProperties());
|
||||||
}
|
}
|
||||||
|
else if (modClass.matcher(className).find())
|
||||||
|
{
|
||||||
|
FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
|
||||||
|
container.rememberModCandidateType(modParser);
|
||||||
|
}
|
||||||
else if (modParser.isBaseMod(container.getRememberedBaseMods()))
|
else if (modParser.isBaseMod(container.getRememberedBaseMods()))
|
||||||
{
|
{
|
||||||
FMLLog.fine("Found a basemod %s of non-standard naming format", className);
|
FMLLog.fine("Found a basemod %s of non-standard naming format", className);
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
import cpw.mods.fml.common.ModContainer;
|
import cpw.mods.fml.common.ModContainer;
|
||||||
|
import cpw.mods.fml.common.discovery.asm.ASMModParser;
|
||||||
|
|
||||||
|
|
||||||
public class ModCandidate
|
public class ModCandidate
|
||||||
@@ -16,6 +18,7 @@ public class ModCandidate
|
|||||||
private boolean classpath;
|
private boolean classpath;
|
||||||
private List<String> baseModTypes = Lists.newArrayList();
|
private List<String> baseModTypes = Lists.newArrayList();
|
||||||
private boolean isMinecraft;
|
private boolean isMinecraft;
|
||||||
|
private List<ASMModParser> baseModCandidateTypes = Lists.newArrayListWithCapacity(1);
|
||||||
|
|
||||||
public ModCandidate(File classPathRoot, File modContainer, ContainerType sourceType)
|
public ModCandidate(File classPathRoot, File modContainer, ContainerType sourceType)
|
||||||
{
|
{
|
||||||
@@ -46,7 +49,16 @@ public class ModCandidate
|
|||||||
}
|
}
|
||||||
public List<ModContainer> explore(ASMDataTable table)
|
public List<ModContainer> explore(ASMDataTable table)
|
||||||
{
|
{
|
||||||
return sourceType.findMods(this, table);
|
List<ModContainer> mods = sourceType.findMods(this, table);
|
||||||
|
if (!baseModCandidateTypes.isEmpty())
|
||||||
|
{
|
||||||
|
FMLLog.info("Attempting to reparse the mod container %s", getModContainer().getName());
|
||||||
|
return sourceType.findMods(this, table);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return mods;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isClasspath()
|
public boolean isClasspath()
|
||||||
@@ -65,4 +77,8 @@ public class ModCandidate
|
|||||||
{
|
{
|
||||||
return isMinecraft;
|
return isMinecraft;
|
||||||
}
|
}
|
||||||
|
public void rememberModCandidateType(ASMModParser modParser)
|
||||||
|
{
|
||||||
|
baseModCandidateTypes.add(modParser);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user