mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-21 23:33:48 -07:00
Hoist out synchronisation from ChunkRegionLoader
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
++i;
|
||||
}
|
||||
}
|
||||
@@ -267,6 +291,40 @@
|
||||
@@ -267,6 +291,42 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -112,12 +112,14 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // Moved from unloadChunks above
|
||||
+ chunk.removeEntities();
|
||||
+ if (save) {
|
||||
+ this.saveChunk(chunk);
|
||||
+ synchronized (this.chunkLoader) {
|
||||
+ chunk.removeEntities();
|
||||
+ if (save) {
|
||||
+ this.saveChunk(chunk);
|
||||
+ }
|
||||
+ this.chunks.remove(chunk.chunkKey);
|
||||
+ this.lastChunk = null;
|
||||
+ }
|
||||
+ this.chunks.remove(chunk.chunkKey);
|
||||
+ this.lastChunk = null;
|
||||
+ return true;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
Reference in New Issue
Block a user