summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/Chunk.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/Chunk.java')
-rw-r--r--src/main/java/net/minecraft/server/Chunk.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index e37db53f..ef81adf9 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -6,6 +6,8 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
+import org.bukkit.craftbukkit.CraftWorld;
+
public class Chunk {
public static boolean a;
@@ -44,7 +46,11 @@ public class Chunk {
}
// CraftBukkit start
- bukkitChunk = new org.bukkit.craftbukkit.CraftChunk( this );
+ CraftWorld cw = ((WorldServer) world).getWorld();
+ bukkitChunk = (cw == null) ? null:cw.popPreservedChunk( i, j );
+ if (bukkitChunk == null) {
+ bukkitChunk = new org.bukkit.craftbukkit.CraftChunk( this );
+ }
}
public org.bukkit.Chunk bukkitChunk;