use of org.terasology.gestalt.module.ModuleMetadataLoader in project Terasology by MovingBlocks.
the class ModuleManager method newModuleFactory.
/**
* Create a ModuleFactory configured for Terasology modules.
*/
private static ModuleFactory newModuleFactory(ModuleMetadataJsonAdapter metadataReader) {
final ModuleFactory moduleFactory;
if (isLoadingClasspathModules()) {
moduleFactory = new ClasspathCompromisingModuleFactory();
Jvm.logClasspath(logger);
} else {
moduleFactory = new ModuleFactory();
}
moduleFactory.setDefaultLibsSubpath("build/libs");
Map<String, ModuleMetadataLoader> mmlm = moduleFactory.getModuleMetadataLoaderMap();
mmlm.put(TerasologyConstants.MODULE_INFO_FILENAME.toString(), metadataReader);
return moduleFactory;
}
Aggregations