From 10c43a9c9f49ae0b70a0fef2b47d7b1312de1954 Mon Sep 17 00:00:00 2001 From: Albert Pham Date: Sun, 2 Jun 2013 12:14:56 -0700 Subject: [PATCH] Made McRegionReader.getChunkInputStream() throw a DataException instead of returning a null when an ungenerated chunk is encountered. --- src/main/java/com/sk89q/worldedit/data/McRegionReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldedit/data/McRegionReader.java b/src/main/java/com/sk89q/worldedit/data/McRegionReader.java index 793d72a4e..743bdfebf 100644 --- a/src/main/java/com/sk89q/worldedit/data/McRegionReader.java +++ b/src/main/java/com/sk89q/worldedit/data/McRegionReader.java @@ -133,7 +133,7 @@ public class McRegionReader { // The chunk hasn't been generated if (offset == 0) { - return null; + throw new DataException("The chunk at " + x + "," + z + " is not generated"); } int sectorNumber = offset >> 8;