forked from MagicBane/Server
Framework to load pixel data
This commit is contained in:
@@ -24,9 +24,13 @@ import java.awt.*;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static java.lang.Math.abs;
|
import static java.lang.Math.abs;
|
||||||
|
|
||||||
@@ -308,6 +312,17 @@ public class HeightMap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Logger.info(HeightMap.heightmapByLoadNum.size() + " Heightmaps cached.");
|
Logger.info(HeightMap.heightmapByLoadNum.size() + " Heightmaps cached.");
|
||||||
|
|
||||||
|
// Load pixel data
|
||||||
|
|
||||||
|
try (Stream<Path> paths = Files.walk(Paths.get("mb.data/heightmaps/TARGA/"))) {
|
||||||
|
paths
|
||||||
|
.filter(Files::isRegularFile)
|
||||||
|
.forEach(System.out::println);
|
||||||
|
} catch (IOException e) {
|
||||||
|
Logger.error(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isLocUnderwater(Vector3fImmutable currentLoc) {
|
public static boolean isLocUnderwater(Vector3fImmutable currentLoc) {
|
||||||
|
|||||||
Reference in New Issue
Block a user