Remove getCubes patch as under some circumstances it can loop around itself forever. For anyone wishing to reimplement this patch, the rationale behind it is quite simple, get all cubes within each chunk at the same time.
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
From a7daf7006ead79d50ea30a02cc1e225f5a192d16 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 1381660..00c2a18 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -292,20 +292,18 @@ public abstract class World implements IBlockAccess {
|
||||
return this.getChunkAt(i >> 4, j >> 4);
|
||||
}
|
||||
|
||||
+ // Spigot start
|
||||
public Chunk getChunkAt(int i, int j) {
|
||||
- // CraftBukkit start
|
||||
- Chunk result = null;
|
||||
- synchronized (this.chunkLock) {
|
||||
- if (this.lastChunkAccessed == null || this.lastXAccessed != i || this.lastZAccessed != j) {
|
||||
- this.lastChunkAccessed = this.chunkProvider.getOrCreateChunk(i, j);
|
||||
- this.lastXAccessed = i;
|
||||
- this.lastZAccessed = j;
|
||||
- }
|
||||
- result = this.lastChunkAccessed;
|
||||
+ //synchronized (this.chunkLock) {
|
||||
+ Chunk result = this.lastChunkAccessed; // Exploit fact that read is atomic
|
||||
+ if (result == null || result.locX != i || result.locZ != j) {
|
||||
+ result = this.chunkProvider.getOrCreateChunk(i, j);
|
||||
+ this.lastChunkAccessed = result; // Exploit fact that write is atomic
|
||||
}
|
||||
+ //}
|
||||
return result;
|
||||
- // CraftBukkit end
|
||||
}
|
||||
+ // Spigot end
|
||||
|
||||
public boolean setTypeAndData(int i, int j, int k, Block block, int l, int i1) {
|
||||
if (i >= -30000000 && k >= -30000000 && i < 30000000 && k < 30000000) {
|
||||
--
|
||||
1.8.3.2
|
||||
|
||||
Reference in New Issue
Block a user