mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 15:05:33 +00:00
World: fixed scheduled updates causing chunk loading
this probably needs to be backported.
This commit is contained in:
parent
b98dad6f63
commit
f3f8cd98de
@ -755,7 +755,12 @@ class World implements ChunkManager{
|
|||||||
|
|
||||||
//Delayed updates
|
//Delayed updates
|
||||||
while($this->scheduledBlockUpdateQueue->count() > 0 and $this->scheduledBlockUpdateQueue->current()["priority"] <= $currentTick){
|
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[World::blockHash($block->x, $block->y, $block->z)]);
|
unset($this->scheduledBlockUpdateQueueIndex[World::blockHash($block->x, $block->y, $block->z)]);
|
||||||
$block->onScheduledUpdate();
|
$block->onScheduledUpdate();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user