use of org.terasology.engine.module.ModuleInstaller in project Terasology by MovingBlocks.
the class SelectModulesScreen method downloadModules.
private void downloadModules(Iterable<Module> modulesToDownload) {
final WaitPopup<List<Module>> popup = getManager().pushScreen(WaitPopup.ASSET_URI, WaitPopup.class);
popup.onSuccess(newModules -> {
for (Module module : newModules) {
modulesLookup.get(module.getId()).setLocalVersion(module);
updateValidToSelect();
}
});
ModuleInstaller operation = moduleManager.getInstallManager().createInstaller(modulesToDownload, new DownloadPopupProgressListener(popup));
popup.startOperation(operation, true);
}
Aggregations