This should fix the chunk ghosting bug

By: Raphfrk <raphfrk@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2011-03-11 19:39:09 +00:00
parent 38856db579
commit 94404a16fe
2 changed files with 8 additions and 2 deletions

View File

@@ -36,12 +36,16 @@ public class CraftChunk implements Chunk {
public net.minecraft.server.Chunk getHandle() {
net.minecraft.server.Chunk c = weakChunk.get();
if (c == null) {
weakChunk = new WeakReference<net.minecraft.server.Chunk>(worldServer.c(x,z));
c = weakChunk.get();
c = worldServer.c(x,z);
weakChunk = new WeakReference<net.minecraft.server.Chunk>(c);
}
return c;
}
void breakLink() {
weakChunk.clear();
}
public int getX() {
return x;
}