Skip to content

Commit 89ca705

Browse files
committed
Fix map-region filter limits on the z-Axis based on minY instead of minZ
1 parent 9e6cdc7 commit 89ca705

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ private static List<Vector2i> getRegions(BmMap map, Vector2i center, int radius)
110110
Predicate<Vector2i> regionFilter = r -> {
111111
Vector2i cellMin = regionGrid.getCellMin(r);
112112
if (cellMin.getX() > map.getMapSettings().getMaxPos().getX()) return false;
113-
if (cellMin.getY() > map.getMapSettings().getMaxPos().getY()) return false;
113+
if (cellMin.getY() > map.getMapSettings().getMaxPos().getZ()) return false;
114114

115115
Vector2i cellMax = regionGrid.getCellMax(r);
116116
if (cellMax.getX() < map.getMapSettings().getMinPos().getX()) return false;
117-
return cellMax.getY() >= map.getMapSettings().getMinPos().getY();
117+
return cellMax.getY() >= map.getMapSettings().getMinPos().getZ();
118118
};
119119

120120
if (center == null || radius < 0) {

BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ private synchronized void init() {
9696
Predicate<Vector2i> boundsTileFilter = t -> {
9797
Vector2i cellMin = tileGrid.getCellMin(t);
9898
if (cellMin.getX() > map.getMapSettings().getMaxPos().getX()) return false;
99-
if (cellMin.getY() > map.getMapSettings().getMaxPos().getY()) return false;
99+
if (cellMin.getY() > map.getMapSettings().getMaxPos().getZ()) return false;
100100

101101
Vector2i cellMax = tileGrid.getCellMax(t);
102102
if (cellMax.getX() < map.getMapSettings().getMinPos().getX()) return false;
103-
return cellMax.getY() >= map.getMapSettings().getMinPos().getY();
103+
return cellMax.getY() >= map.getMapSettings().getMinPos().getZ();
104104
};
105105

106106
this.tileCount = tileSet.size();

0 commit comments

Comments
 (0)