mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 00:09:39 +00:00
World: do not execute neighbour block updates on unloaded chunks
we might also need to delay this if any adjacent chunk is also not loaded, in case the block wants to access adjacent blocks during its neighbour update.
This commit is contained in:
parent
cfb9cc8999
commit
058bb3a91a
@ -740,6 +740,9 @@ class World implements ChunkManager{
|
||||
while($this->neighbourBlockUpdateQueue->count() > 0){
|
||||
$index = $this->neighbourBlockUpdateQueue->dequeue();
|
||||
World::getBlockXYZ($index, $x, $y, $z);
|
||||
if(!$this->isChunkLoaded($x >> 4, $z >> 4)){
|
||||
continue;
|
||||
}
|
||||
|
||||
$block = $this->getBlockAt($x, $y, $z);
|
||||
$block->readStateFromWorld(); //for blocks like fences, force recalculation of connected AABBs
|
||||
|
Loading…
x
Reference in New Issue
Block a user