Extend chunk load/generate fault in volume

This commit is contained in:
Mike Primm 2011-09-15 08:16:22 +08:00 committed by mikeprimm
parent 98d18260c4
commit 33add48697
2 changed files with 8 additions and 8 deletions

View File

@ -589,13 +589,13 @@ public class DynmapPlugin extends JavaPlugin {
/* Touch extreme corners */ /* Touch extreme corners */
int x = event.getChunk().getX() << 4; int x = event.getChunk().getX() << 4;
int z = event.getChunk().getZ() << 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 @Override
public void onChunkPopulate(ChunkPopulateEvent event) { public void onChunkPopulate(ChunkPopulateEvent event) {
int x = event.getChunk().getX() << 4; int x = event.getChunk().getX() << 4;
int z = event.getChunk().getZ() << 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 @Override
public void onWorldLoad(WorldLoadEvent event) { public void onWorldLoad(WorldLoadEvent event) {

View File

@ -799,27 +799,27 @@ public class IsoHDPerspective implements HDPerspective {
Vector3D blocks[] = new Vector3D[] { new Vector3D(), new Vector3D() }; Vector3D blocks[] = new Vector3D[] { new Vector3D(), new Vector3D() };
/* Get ordered point - 0=minX,Y,Z, 1=maxX,Y,Z */ /* Get ordered point - 0=minX,Y,Z, 1=maxX,Y,Z */
if(loc0.getBlockX() < loc1.getBlockX()) { if(loc0.getBlockX() < loc1.getBlockX()) {
blocks[0].x = loc0.getBlockX(); blocks[0].x = loc0.getBlockX() - 1;
blocks[1].x = loc1.getBlockX() + 1; blocks[1].x = loc1.getBlockX() + 1;
} }
else { else {
blocks[0].x = loc1.getBlockX(); blocks[0].x = loc1.getBlockX() - 1;
blocks[1].x = loc0.getBlockX() + 1; blocks[1].x = loc0.getBlockX() + 1;
} }
if(loc0.getBlockY() < loc1.getBlockY()) { if(loc0.getBlockY() < loc1.getBlockY()) {
blocks[0].y = loc0.getBlockY(); blocks[0].y = loc0.getBlockY() - 1;
blocks[1].y = loc1.getBlockY() + 1; blocks[1].y = loc1.getBlockY() + 1;
} }
else { else {
blocks[0].y = loc1.getBlockY(); blocks[0].y = loc1.getBlockY() - 1;
blocks[1].y = loc0.getBlockY() + 1; blocks[1].y = loc0.getBlockY() + 1;
} }
if(loc0.getBlockZ() < loc1.getBlockZ()) { if(loc0.getBlockZ() < loc1.getBlockZ()) {
blocks[0].z = loc0.getBlockZ(); blocks[0].z = loc0.getBlockZ() - 1;
blocks[1].z = loc1.getBlockZ() + 1; blocks[1].z = loc1.getBlockZ() + 1;
} }
else { else {
blocks[0].z = loc1.getBlockZ(); blocks[0].z = loc1.getBlockZ() - 1;
blocks[1].z = loc0.getBlockZ() + 1; blocks[1].z = loc0.getBlockZ() + 1;
} }
Vector3D corner = new Vector3D(); Vector3D corner = new Vector3D();