From 33add486973c6c976d814315b79a9efe4bd9f3ee Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Thu, 15 Sep 2011 08:16:22 +0800 Subject: [PATCH] Extend chunk load/generate fault in volume --- src/main/java/org/dynmap/DynmapPlugin.java | 4 ++-- src/main/java/org/dynmap/hdmap/IsoHDPerspective.java | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index 135d55b7..b44bd127 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -589,13 +589,13 @@ public class DynmapPlugin extends JavaPlugin { /* Touch extreme corners */ int x = event.getChunk().getX() << 4; int z = event.getChunk().getZ() << 4; - mapManager.touchVolume(new Location(event.getWorld(), x, 0, z), new Location(event.getWorld(), x+15, 127, z+15)); + mapManager.touchVolume(new Location(event.getWorld(), x, 0, z), new Location(event.getWorld(), x+16, 128, z+16)); } @Override public void onChunkPopulate(ChunkPopulateEvent event) { int x = event.getChunk().getX() << 4; int z = event.getChunk().getZ() << 4; - mapManager.touchVolume(new Location(event.getWorld(), x, 0, z), new Location(event.getWorld(), x+15, 127, z+15)); + mapManager.touchVolume(new Location(event.getWorld(), x, 0, z), new Location(event.getWorld(), x+16, 128, z+16)); } @Override public void onWorldLoad(WorldLoadEvent event) { diff --git a/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java b/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java index 3af2b3de..8a7c38ed 100644 --- a/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java +++ b/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java @@ -799,27 +799,27 @@ public class IsoHDPerspective implements HDPerspective { Vector3D blocks[] = new Vector3D[] { new Vector3D(), new Vector3D() }; /* Get ordered point - 0=minX,Y,Z, 1=maxX,Y,Z */ if(loc0.getBlockX() < loc1.getBlockX()) { - blocks[0].x = loc0.getBlockX(); + blocks[0].x = loc0.getBlockX() - 1; blocks[1].x = loc1.getBlockX() + 1; } else { - blocks[0].x = loc1.getBlockX(); + blocks[0].x = loc1.getBlockX() - 1; blocks[1].x = loc0.getBlockX() + 1; } if(loc0.getBlockY() < loc1.getBlockY()) { - blocks[0].y = loc0.getBlockY(); + blocks[0].y = loc0.getBlockY() - 1; blocks[1].y = loc1.getBlockY() + 1; } else { - blocks[0].y = loc1.getBlockY(); + blocks[0].y = loc1.getBlockY() - 1; blocks[1].y = loc0.getBlockY() + 1; } if(loc0.getBlockZ() < loc1.getBlockZ()) { - blocks[0].z = loc0.getBlockZ(); + blocks[0].z = loc0.getBlockZ() - 1; blocks[1].z = loc1.getBlockZ() + 1; } else { - blocks[0].z = loc1.getBlockZ(); + blocks[0].z = loc1.getBlockZ() - 1; blocks[1].z = loc0.getBlockZ() + 1; } Vector3D corner = new Vector3D();