Renamed y to z in DynmapChunk.

This commit is contained in:
FrozenCow 2011-02-09 00:42:16 +01:00
parent fb1b5df3d0
commit 5c209c2a5e
2 changed files with 7 additions and 7 deletions

View File

@ -1,10 +1,10 @@
package org.dynmap;
public class DynmapChunk {
public int x, y;
public int x, z;
public DynmapChunk(int x, int y) {
public DynmapChunk(int x, int z) {
this.x = x;
this.y = y;
this.z = z;
}
}

View File

@ -103,13 +103,13 @@ public class MapManager extends Thread {
// Unload old chunks.
while (loadedChunks.size() >= requiredChunkCount - requiredChunks.length) {
DynmapChunk c = loadedChunks.pollFirst();
world.unloadChunk(c.x, c.y, false, true);
world.unloadChunk(c.x, c.z, false, true);
}
// Load the required chunks.
for (DynmapChunk chunk : requiredChunks) {
boolean wasLoaded = world.isChunkLoaded(chunk.x, chunk.y);
world.loadChunk(chunk.x, chunk.y, false);
boolean wasLoaded = world.isChunkLoaded(chunk.x, chunk.z);
world.loadChunk(chunk.x, chunk.z, false);
if (!wasLoaded)
loadedChunks.add(chunk);
}
@ -132,7 +132,7 @@ public class MapManager extends Thread {
// Unload remaining chunks to clean-up.
while (!loadedChunks.isEmpty()) {
DynmapChunk c = loadedChunks.pollFirst();
world.unloadChunk(c.x, c.y, false, true);
world.unloadChunk(c.x, c.z, false, true);
}
}
debugger.debug("Full render finished.");