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:
Dylan K. Taylor 2018-01-05 13:46:21 +00:00
parent 418d099a2e
commit 8fbd0e58f0

View File

@ -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();