From 3d5cd0953f5f6c4e2c64e05b1ca18cafdb2456e0 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 29 Nov 2014 15:05:28 +0000 Subject: [PATCH] Ignore invalid blocks in ChunkSnapshots By: Thinkofdeath --- .../src/main/java/org/bukkit/craftbukkit/CraftChunk.java | 1 + 1 file changed, 1 insertion(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 9b481a08fd..9b6632ff4e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/paper-server/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;