From 89ca7053dd6624f5a9b9dc39e807713451dc7b8c Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Wed, 17 Aug 2022 22:38:07 +0200 Subject: [PATCH] Fix map-region filter limits on the z-Axis based on minY instead of minZ --- .../bluemap/common/rendermanager/MapUpdateTask.java | 4 ++-- .../bluemap/common/rendermanager/WorldRegionRenderTask.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java index 34739fc0..70362ed9 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java @@ -110,11 +110,11 @@ private static List getRegions(BmMap map, Vector2i center, int radius) Predicate regionFilter = r -> { Vector2i cellMin = regionGrid.getCellMin(r); if (cellMin.getX() > map.getMapSettings().getMaxPos().getX()) return false; - if (cellMin.getY() > map.getMapSettings().getMaxPos().getY()) return false; + if (cellMin.getY() > map.getMapSettings().getMaxPos().getZ()) return false; Vector2i cellMax = regionGrid.getCellMax(r); if (cellMax.getX() < map.getMapSettings().getMinPos().getX()) return false; - return cellMax.getY() >= map.getMapSettings().getMinPos().getY(); + return cellMax.getY() >= map.getMapSettings().getMinPos().getZ(); }; if (center == null || radius < 0) { diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java index 51982c49..b4348c9a 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java @@ -96,11 +96,11 @@ private synchronized void init() { Predicate boundsTileFilter = t -> { Vector2i cellMin = tileGrid.getCellMin(t); if (cellMin.getX() > map.getMapSettings().getMaxPos().getX()) return false; - if (cellMin.getY() > map.getMapSettings().getMaxPos().getY()) return false; + if (cellMin.getY() > map.getMapSettings().getMaxPos().getZ()) return false; Vector2i cellMax = tileGrid.getCellMax(t); if (cellMax.getX() < map.getMapSettings().getMinPos().getX()) return false; - return cellMax.getY() >= map.getMapSettings().getMinPos().getY(); + return cellMax.getY() >= map.getMapSettings().getMinPos().getZ(); }; this.tileCount = tileSet.size();