forked from SteamWar/SteamWar
Reduce usable tile area
Fix DynamicRegionVisualizer throwing exceptions
This commit is contained in:
+10
-1
@@ -88,6 +88,14 @@ public class DynamicRegionSystem implements RegionSystem {
|
||||
.collect(Collectors.toUnmodifiableMap(entry -> entry.getValue().identifier(), Map.Entry::getKey));
|
||||
|
||||
DynamicRegionRepository.loadRegions();
|
||||
// [STDOUT] PATH 239
|
||||
// [STDOUT] DRY 4
|
||||
// [STDOUT] DRY_SPECIAL 18
|
||||
// [STDOUT] WET 2
|
||||
// [STDOUT] WET_SPECIAL 9
|
||||
regionTypeMap.forEach((type, regions) -> {
|
||||
System.out.println(type + " " + regions.size());
|
||||
});
|
||||
new DynamicRegionCommand();
|
||||
new WireframeCommand();
|
||||
}
|
||||
@@ -109,9 +117,10 @@ public class DynamicRegionSystem implements RegionSystem {
|
||||
Set<Tile> tiles = new HashSet<>();
|
||||
for (int x = minPoint.getX(); x < maxPoint.getX(); x += Tile.tileSize) {
|
||||
for (int z = minPoint.getZ(); z < maxPoint.getZ(); z += Tile.tileSize) {
|
||||
tiles.add(Tile.fromXZ(x, z).orElseThrow());
|
||||
tiles.add(Tile.fromXZ(x, z).orElse(null));
|
||||
}
|
||||
}
|
||||
tiles.remove(null);
|
||||
return Collections.unmodifiableSet(tiles);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user