Fixed a bug where the list of edited blocks for the lowest quarter of a chunk were not loaded.

This commit is contained in:
Glitchfinder 2012-06-12 01:15:51 -07:00
parent 534a165c45
commit e207d9829d

View File

@ -26,7 +26,7 @@ public class HashChunkletManager implements ChunkletManager {
File czDir = new File(cxDir, "" + cz); File czDir = new File(cxDir, "" + cz);
if(!czDir.exists()) return; if(!czDir.exists()) return;
for(int y = 1; y <= 4; y++) { for(int y = 0; y <= 4; y++) {
File yFile = new File(czDir, "" + y); File yFile = new File(czDir, "" + y);
if(!yFile.exists()) { if(!yFile.exists()) {
continue; continue;
@ -43,7 +43,7 @@ public class HashChunkletManager implements ChunkletManager {
public void chunkUnloaded(int cx, int cz, World world) { public void chunkUnloaded(int cx, int cz, World world) {
File dataDir = new File(world.getWorldFolder(), "mcmmo_data"); File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
for(int y = 1; y <= 4; y++) { for(int y = 0; y <= 4; y++) {
if(store.containsKey(world.getName() + "," + cx + "," + cz + "," + y)) { if(store.containsKey(world.getName() + "," + cx + "," + cz + "," + y)) {
File cxDir = new File(dataDir, "" + cx); File cxDir = new File(dataDir, "" + cx);
if(!cxDir.exists()) cxDir.mkdir(); if(!cxDir.exists()) cxDir.mkdir();