|
|
@ -315,10 +315,21 @@ public class HeightMap { |
|
|
|
|
|
|
|
|
|
|
|
// Load pixel data
|
|
|
|
// Load pixel data
|
|
|
|
|
|
|
|
|
|
|
|
try (Stream<Path> paths = Files.walk(Paths.get("mb.data/heightmaps/TARGA/"))) { |
|
|
|
try (Stream<Path> filePathStream = Files.walk(Paths.get(ConfigManager.DEFAULT_DATA_DIR + "heightmaps/TARGA/"))) { |
|
|
|
paths |
|
|
|
filePathStream.forEach(filePath -> { |
|
|
|
.filter(Files::isRegularFile) |
|
|
|
|
|
|
|
.forEach(System.out::println); |
|
|
|
if (Files.isRegularFile(filePath)) { |
|
|
|
|
|
|
|
File imageFile = filePath.toFile(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
BufferedImage heightmapImage = ImageIO.read(imageFile); |
|
|
|
|
|
|
|
} catch (IOException e) { |
|
|
|
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} catch (IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
Logger.error(e); |
|
|
|
Logger.error(e); |
|
|
|
} |
|
|
|
} |
|
|
|