diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-29 15:05:28 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-29 15:05:28 +0000 |
commit | f498585eccfc5af8574c121504d482b04c960184 (patch) | |
tree | aac7b67f6aaf3e08716487cd0845acbe031a400d /src/main/java/org/bukkit | |
parent | a2c4d7e150ea295a656487062a187be07cd47677 (diff) | |
download | craftbukkit-f498585eccfc5af8574c121504d482b04c960184.tar craftbukkit-f498585eccfc5af8574c121504d482b04c960184.tar.gz craftbukkit-f498585eccfc5af8574c121504d482b04c960184.tar.lz craftbukkit-f498585eccfc5af8574c121504d482b04c960184.tar.xz craftbukkit-f498585eccfc5af8574c121504d482b04c960184.zip |
Ignore invalid blocks in ChunkSnapshots
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftChunk.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 9b481a08..9b6632ff 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -170,6 +170,7 @@ public class CraftChunk implements Chunk { for (int j = 0; j < 4096; j++) { if (baseids[j] == 0) continue; IBlockData blockData = (IBlockData) net.minecraft.server.Block.d.a(baseids[j]); + if (blockData == null) continue; blockids[j] = (short) net.minecraft.server.Block.getId(blockData.getBlock()); int data = blockData.getBlock().toLegacyData(blockData); int jj = j >> 1; |