Updated a couple of libraries. Fixed bug where modid could be in toml but
not found during loading, yet game continued to load. Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
parent
605c4a0adf
commit
6a1337aa92
3 changed files with 13 additions and 4 deletions
|
@ -310,9 +310,9 @@ project(':forge') {
|
||||||
installer 'org.ow2.asm:asm:6.2'
|
installer 'org.ow2.asm:asm:6.2'
|
||||||
installer 'org.ow2.asm:asm-commons:6.2'
|
installer 'org.ow2.asm:asm-commons:6.2'
|
||||||
installer 'org.ow2.asm:asm-tree:6.2'
|
installer 'org.ow2.asm:asm-tree:6.2'
|
||||||
installer 'cpw.mods:modlauncher:1.0.+'
|
installer 'cpw.mods:modlauncher:1.1.+'
|
||||||
installer 'net.minecraftforge:accesstransformers:0.16.+:shadowed'
|
installer 'net.minecraftforge:accesstransformers:0.16.+:shadowed'
|
||||||
installer 'net.minecraftforge:eventbus:0.8.+:service'
|
installer 'net.minecraftforge:eventbus:0.9.+:service'
|
||||||
installer 'net.minecraftforge:forgespi:0.12.+'
|
installer 'net.minecraftforge:forgespi:0.12.+'
|
||||||
installer 'net.minecraftforge:coremods:0.4.+'
|
installer 'net.minecraftforge:coremods:0.4.+'
|
||||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||||
|
|
|
@ -166,8 +166,16 @@ public class ModLoader
|
||||||
final Map<String, IModInfo> modInfoMap = modFile.getModFileInfo().getMods().stream().collect(Collectors.toMap(IModInfo::getModId, Function.identity()));
|
final Map<String, IModInfo> modInfoMap = modFile.getModFileInfo().getMods().stream().collect(Collectors.toMap(IModInfo::getModId, Function.identity()));
|
||||||
|
|
||||||
LOGGER.debug(LOADING, "ModContainer is {}", ModContainer.class.getClassLoader());
|
LOGGER.debug(LOADING, "ModContainer is {}", ModContainer.class.getClassLoader());
|
||||||
return modFile.getScanResult().getTargets().entrySet().stream().
|
final List<ModContainer> containers = modFile.getScanResult().getTargets().entrySet().stream().
|
||||||
map(e-> buildModContainerFromTOML(modFile, modClassLoader, modInfoMap, e)).collect(Collectors.toList());
|
map(e -> buildModContainerFromTOML(modFile, modClassLoader, modInfoMap, e)).collect(Collectors.toList());
|
||||||
|
if (containers.size() != modInfoMap.size()) {
|
||||||
|
LOGGER.fatal(LOADING,"File {} constructed {} mods: {}, but had {} mods specified: {}",
|
||||||
|
modFile.getFilePath(),
|
||||||
|
containers.size(), containers.stream().map(ModContainer::getModId).collect(Collectors.toList()),
|
||||||
|
modInfoMap.size(), modInfoMap.values().stream().map(IModInfo::getModId).collect(Collectors.toList()));
|
||||||
|
loadingExceptions.add(new ModLoadingException(null, ModLoadingStage.CONSTRUCT, "fml.modloading.missingclasses", null, modFile.getFilePath()));
|
||||||
|
}
|
||||||
|
return containers;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ModContainer buildModContainerFromTOML(final ModFile modFile, final TransformingClassLoader modClassLoader, final Map<String, IModInfo> modInfoMap, final Map.Entry<String, ? extends IModLanguageProvider.IModLanguageLoader> idToProviderEntry) {
|
private ModContainer buildModContainerFromTOML(final ModFile modFile, final TransformingClassLoader modClassLoader, final Map<String, IModInfo> modInfoMap, final Map.Entry<String, ? extends IModLanguageProvider.IModLanguageLoader> idToProviderEntry) {
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
"fml.loadingerrorscreen.errorheader": "Error loading mods\n{0,choice,1#1 error has|1<{0} errors have} occurred during loading",
|
"fml.loadingerrorscreen.errorheader": "Error loading mods\n{0,choice,1#1 error has|1<{0} errors have} occurred during loading",
|
||||||
"fml.loadingerrorscreen.warningheader": "{0,choice,1#Warning|1<Warnings} while loading mods\n{0,choice,1#1 warning has|1<{0} warnings have} occurred during loading",
|
"fml.loadingerrorscreen.warningheader": "{0,choice,1#Warning|1<Warnings} while loading mods\n{0,choice,1#1 warning has|1<{0} warnings have} occurred during loading",
|
||||||
"fml.language.missingversion": "Mod File {5} needs language provider {3}:{4,vr} to load\n\u00a77We have found {6,i18n,fml.messages.artifactversion}",
|
"fml.language.missingversion": "Mod File {5} needs language provider {3}:{4,vr} to load\n\u00a77We have found {6,i18n,fml.messages.artifactversion}",
|
||||||
|
"fml.modloading.missingclasses": "The Mod File {3} has mods that were not found",
|
||||||
"fml.modloading.missingmetadata": "mods.toml missing metadata for modid {3}",
|
"fml.modloading.missingmetadata": "mods.toml missing metadata for modid {3}",
|
||||||
"fml.modloading.failedtoloadmodclass":"{0,modinfo,name} has class loading errors\n\u00a77{2,exc,msg}",
|
"fml.modloading.failedtoloadmodclass":"{0,modinfo,name} has class loading errors\n\u00a77{2,exc,msg}",
|
||||||
"fml.modloading.failedtoloadmod":"{0,modinfo,name} ({0,modinfo,id}) has failed to load correctly\n\u00a77{2,exc,msg}",
|
"fml.modloading.failedtoloadmod":"{0,modinfo,name} ({0,modinfo,id}) has failed to load correctly\n\u00a77{2,exc,msg}",
|
||||||
|
|
Loading…
Reference in a new issue