Prevent Blocks from getting lost when a chunk reloads

This commit is contained in:
Erik Broes
2011-02-20 17:09:02 +01:00
parent ca4076077e
commit 6e3ee31336
4 changed files with 21 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ import org.bukkit.block.Block;
import org.bukkit.craftbukkit.block.CraftBlock;
public class CraftChunk implements Chunk {
private final net.minecraft.server.Chunk chunk;
private net.minecraft.server.Chunk chunk;
private final HashMap<Integer, Block> cache = new HashMap<Integer, Block>();
public CraftChunk(net.minecraft.server.Chunk chunk) {
@@ -48,4 +48,8 @@ public class CraftChunk implements Chunk {
}
return block;
}
public void breakLink() {
this.chunk = null;
}
}