Search in sources :

Example 1 with ModuleMetadataLoader

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;
}
Also used : ModuleFactory(org.terasology.gestalt.module.ModuleFactory) ModuleMetadataLoader(org.terasology.gestalt.module.ModuleMetadataLoader)

Aggregations

ModuleFactory (org.terasology.gestalt.module.ModuleFactory)1 ModuleMetadataLoader (org.terasology.gestalt.module.ModuleMetadataLoader)1