diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 32c808bec9..c3b9113a6d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -193,8 +193,12 @@ public class CraftChunk implements Chunk { /* Get block data nibbles */ sectionBlockData[i] = new byte[2048]; System.arraycopy(cs[i].j().a, 0, sectionBlockData[i], 0, 2048); // Should be getData - sectionSkyLights[i] = new byte[2048]; - System.arraycopy(cs[i].l().a, 0, sectionSkyLights[i], 0, 2048); // Should be getSkyLight + if (cs[i].l() == null) { + sectionSkyLights[i] = emptyData; + } else { + sectionSkyLights[i] = new byte[2048]; + System.arraycopy(cs[i].l().a, 0, sectionSkyLights[i], 0, 2048); // Should be getSkyLight + } sectionEmitLights[i] = new byte[2048]; System.arraycopy(cs[i].k().a, 0, sectionEmitLights[i], 0, 2048); // Should be getBlockLight }