@@ -1,11 +1,11 @@
|
||||
From 5778aaae32fd276df37a9941ec8c281431bd3803 Mon Sep 17 00:00:00 2001
|
||||
From ee9e6ca1ffb8d21f7ba22952c3949e15f3ab3ef3 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Wed, 16 Jan 2013 15:27:22 -0600
|
||||
Subject: [PATCH] Sync Free Chunk Reference Cache
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 967565b..93c476c 100644
|
||||
index b21bff3..f7fa2fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -290,20 +290,18 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -25,7 +25,7 @@ index 967565b..93c476c 100644
|
||||
- result = this.lastChunkAccessed;
|
||||
+ //synchronized (this.chunkLock) {
|
||||
+ Chunk result = this.lastChunkAccessed; // Exploit fact that read is atomic
|
||||
+ if (result == null || result.x != i || result.z != j) {
|
||||
+ if (result == null || result.locX != i || result.locZ != j) {
|
||||
+ result = this.chunkProvider.getOrCreateChunk(i, j);
|
||||
+ this.lastChunkAccessed = result; // Exploit fact that write is atomic
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user