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:
parent
61153abf7b
commit
7a58542fb8
|
@ -25,6 +25,11 @@ public class ModContainerFactory
|
|||
FMLLog.fine("Identified a BaseMod type mod %s", className);
|
||||
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()))
|
||||
{
|
||||
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 cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.discovery.asm.ASMModParser;
|
||||
|
||||
|
||||
public class ModCandidate
|
||||
|
@ -16,6 +18,7 @@ public class ModCandidate
|
|||
private boolean classpath;
|
||||
private List<String> baseModTypes = Lists.newArrayList();
|
||||
private boolean isMinecraft;
|
||||
private List<ASMModParser> baseModCandidateTypes = Lists.newArrayListWithCapacity(1);
|
||||
|
||||
public ModCandidate(File classPathRoot, File modContainer, ContainerType sourceType)
|
||||
{
|
||||
|
@ -46,7 +49,16 @@ public class ModCandidate
|
|||
}
|
||||
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()
|
||||
|
@ -65,4 +77,8 @@ public class ModCandidate
|
|||
{
|
||||
return isMinecraft;
|
||||
}
|
||||
public void rememberModCandidateType(ASMModParser modParser)
|
||||
{
|
||||
baseModCandidateTypes.add(modParser);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue