Prevent Blocks from getting lost when a chunk reloads

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot
2011-02-20 17:09:02 +01:00
parent 4ee3f413af
commit 7b11e33f85
2 changed files with 15 additions and 1 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;
}
}