Handle lighting checks above world top

This commit is contained in:
Mike Primm 2012-03-13 01:10:47 -05:00
parent 915b576b82
commit 179eeca03d

View file

@ -114,10 +114,18 @@ public class NewMapChunkCache implements MapChunkCache {
return blkdata; return blkdata;
} }
public int getBlockSkyLight() { public int getBlockSkyLight() {
return snap.getBlockSkyLight(bx, y, bz); try {
return snap.getBlockSkyLight(bx, y, bz);
} catch (ArrayIndexOutOfBoundsException aioobx) {
return 15;
}
} }
public final int getBlockEmittedLight() { public final int getBlockEmittedLight() {
return snap.getBlockEmittedLight(bx, y, bz); try {
return snap.getBlockEmittedLight(bx, y, bz);
} catch (ArrayIndexOutOfBoundsException aioobx) {
return 0;
}
} }
private void biomePrep() { private void biomePrep() {
if(sameneighborbiomecnt != null) if(sameneighborbiomecnt != null)