don't store weak references for EmptyChunks or cache CraftBlocks

This commit is contained in:
Tahg
2011-10-05 11:31:23 -04:00
parent 8ab90b344c
commit 696349884b
2 changed files with 14 additions and 21 deletions

View File

@@ -56,10 +56,12 @@ public class Chunk {
Arrays.fill(this.c, -999);
// CraftBukkit start
org.bukkit.craftbukkit.CraftWorld cworld = this.world.getWorld();
this.bukkitChunk = (cworld == null) ? null : cworld.popPreservedChunk(i, j);
if (this.bukkitChunk == null) {
this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
if (!(this instanceof EmptyChunk)) {
org.bukkit.craftbukkit.CraftWorld cworld = this.world.getWorld();
this.bukkitChunk = (cworld == null) ? null : cworld.popPreservedChunk(i, j);
if (this.bukkitChunk == null) {
this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
}
}
}