Fixed update ticks

This commit is contained in:
Shoghi Cervantes 2014-06-22 21:32:49 +02:00
parent 279a438ae6
commit 0e36107878

View File

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