use of org.terasology.gestalt.module.ModuleEnvironment in project Terasology by MovingBlocks.
the class TelemetryScreen method fetchTelemetryCategoriesFromEngineOnlyEnvironment.
/**
* refresh the telemetryCategories map.
*/
private void fetchTelemetryCategoriesFromEngineOnlyEnvironment() {
telemetryCategories = Maps.newHashMap();
try (ModuleEnvironment environment = moduleManager.loadEnvironment(Collections.emptySet(), false)) {
for (Class<?> holdingType : environment.getTypesAnnotatedWith(TelemetryCategory.class)) {
TelemetryCategory telemetryCategory = holdingType.getAnnotation(TelemetryCategory.class);
telemetryCategories.put(telemetryCategory, holdingType);
}
}
}
Aggregations