From 6e3ee31336dcec939139cc97cab11d98fb99145d Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Sun, 20 Feb 2011 17:09:02 +0100 Subject: Prevent Blocks from getting lost when a chunk reloads --- src/main/java/net/minecraft/server/Chunk.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/net/minecraft/server/Chunk.java') diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index e37db53f..592e3408 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -44,7 +44,10 @@ public class Chunk { } // CraftBukkit start - bukkitChunk = new org.bukkit.craftbukkit.CraftChunk( this ); + bukkitChunk = ((WorldServer) world).getWorld().popPreservedChunk( i, j ); + if (bukkitChunk == null) { + bukkitChunk = new org.bukkit.craftbukkit.CraftChunk( this ); + } } public org.bukkit.Chunk bukkitChunk; -- cgit v1.2.3