summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-02-07 03:34:32 -0500
committerTahg <tahgtahv@gmail.com>2011-02-07 03:34:32 -0500
commit8acebcd7d6458ceb191e96607ed9c9cc6e37284d (patch)
tree41a83d8f5708687c47905c3c73cbfef99d947d95 /src/main/java
parent36295808688ff6360e22846b3a9017740bf36719 (diff)
downloadcraftbukkit-8acebcd7d6458ceb191e96607ed9c9cc6e37284d.tar
craftbukkit-8acebcd7d6458ceb191e96607ed9c9cc6e37284d.tar.gz
craftbukkit-8acebcd7d6458ceb191e96607ed9c9cc6e37284d.tar.lz
craftbukkit-8acebcd7d6458ceb191e96607ed9c9cc6e37284d.tar.xz
craftbukkit-8acebcd7d6458ceb191e96607ed9c9cc6e37284d.zip
Fixed Chunk cache in world
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/World.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 043e4c2f..3a24d16d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -278,7 +278,7 @@ public class World implements IBlockAccess {
int lastXAccessed = Integer.MIN_VALUE;
int lastZAccessed = Integer.MIN_VALUE;
public Chunk c(int i, int j) {
- if(lastXAccessed != i || lastZAccessed != j) {
+ if(lastChunkAccessed == null || lastXAccessed != i || lastZAccessed != j) {
lastXAccessed = i;
lastZAccessed = j;
lastChunkAccessed = this.G.b(i, j);
@@ -1367,7 +1367,12 @@ public class World implements IBlockAccess {
if (!this.f(k1, 64, l1)) {
--y;
- } else if (!this.b(k1, l1).g()) {
+ } else {
+ Chunk chunk = this.b(k1, l1);
+ if(chunk == null) {
+ System.out.println(k1 + "," + l1);
+ }
+ if (!chunk.g()) {
int i2 = this.A.size();
int j2;
@@ -1396,6 +1401,7 @@ public class World implements IBlockAccess {
--y;
}
+ }
}
}
}