mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
World: fixed scheduled updates causing chunk loading
this probably needs to be backported.
This commit is contained in:
parent
cb40484a2e
commit
2d3562c687
@ -820,7 +820,12 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
//Delayed updates
|
||||
while($this->scheduledBlockUpdateQueue->count() > 0 and $this->scheduledBlockUpdateQueue->current()["priority"] <= $currentTick){
|
||||
$block = $this->getBlock($this->scheduledBlockUpdateQueue->extract()["data"]);
|
||||
/** @var Vector3 $vec */
|
||||
$vec = $this->scheduledBlockUpdateQueue->extract()["data"];
|
||||
if(!$this->isInLoadedTerrain($vec)){
|
||||
continue;
|
||||
}
|
||||
$block = $this->getBlock($vec);
|
||||
unset($this->scheduledBlockUpdateQueueIndex[Level::blockHash($block->x, $block->y, $block->z)]);
|
||||
$block->onScheduledUpdate();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user