mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Level: Fixed possible crash with changed blocks handling
Since chunks are unloaded before changed blocks are processed, there is a small chance that a block might get changed in a chunk, and then get unloaded due to not being in use, before the updates are broadcasted. This is unlikely to ever happen since chunks usually don't get unloaded unless they don't have loaders anyway, but it could happen (?) if a chunk is forcefully unloaded.
This commit is contained in:
parent
418d099a2e
commit
8fbd0e58f0
@ -2887,6 +2887,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
unset($this->chunkTickList[$chunkHash]);
|
||||
unset($this->chunkCache[$chunkHash]);
|
||||
unset($this->blockCache[$chunkHash]);
|
||||
unset($this->changedBlocks[$chunkHash]);
|
||||
|
||||
$this->timings->doChunkUnload->stopTiming();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user