From 1ab7a8ddbf4524c850614d2d355d2f1045452084 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Tue, 13 Mar 2012 01:10:47 -0500 Subject: [PATCH] Handle lighting checks above world top --- .../java/org/dynmap/bukkit/NewMapChunkCache.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/dynmap/bukkit/NewMapChunkCache.java b/src/main/java/org/dynmap/bukkit/NewMapChunkCache.java index f9b77512..e6f92b04 100644 --- a/src/main/java/org/dynmap/bukkit/NewMapChunkCache.java +++ b/src/main/java/org/dynmap/bukkit/NewMapChunkCache.java @@ -114,10 +114,18 @@ public class NewMapChunkCache implements MapChunkCache { return blkdata; } 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() { - return snap.getBlockEmittedLight(bx, y, bz); + try { + return snap.getBlockEmittedLight(bx, y, bz); + } catch (ArrayIndexOutOfBoundsException aioobx) { + return 0; + } } private void biomePrep() { if(sameneighborbiomecnt != null)