mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 11:15:57 -07:00
SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate events
This commit is contained in:
@@ -102,3 +102,22 @@
|
||||
|
||||
if (object2intmap.getInt(enumcreaturetype) <= k1) {
|
||||
SpawnerCreature.a(enumcreaturetype, (World) this.world, chunk, blockposition);
|
||||
@@ -447,12 +489,18 @@
|
||||
|
||||
@Override
|
||||
protected boolean executeNext() {
|
||||
+ // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
||||
+ try {
|
||||
if (ChunkProviderServer.this.tickDistanceManager()) {
|
||||
return true;
|
||||
} else {
|
||||
ChunkProviderServer.this.lightEngine.queueUpdate();
|
||||
return super.executeNext();
|
||||
}
|
||||
+ } finally {
|
||||
+ playerChunkMap.callbackExecutor.run();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user