mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-21 21:14:39 +00:00
Fixed update ticks
This commit is contained in:
parent
279a438ae6
commit
0e36107878
@ -164,7 +164,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
$this->server->getGenerationManager()->openLevel($this, $generator, $this->provider->getGeneratorOptions());
|
||||
|
||||
$this->folderName = $name;
|
||||
|
||||
$this->updateQueue = new ReversePriorityQueue();
|
||||
$this->startTime = $this->time = (int) $this->provider->getTime();
|
||||
$this->nextSave = $this->startCheck = microtime(true);
|
||||
$this->nextSave = microtime(true) + 90;
|
||||
@ -376,6 +376,8 @@ class Level implements ChunkManager, Metadatable{
|
||||
$this->changedBlocks = [];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$X = null;
|
||||
$Z = null;
|
||||
|
||||
@ -383,6 +385,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
while($this->updateQueue->count() > 0 and $this->updateQueue->current()["priority"] <= $currentTick){
|
||||
$block = $this->getBlock($this->updateQueue->extract()["data"]);
|
||||
$block->onUpdate(self::BLOCK_UPDATE_SCHEDULED);
|
||||
|
||||
}
|
||||
|
||||
foreach($this->usedChunks as $index => $p){
|
||||
@ -400,7 +403,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($this->nextSave < microtime(true)){
|
||||
$X = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user