Better time ticking and sync (#2)

* Remove unnecessary SetTimePacket spam

This is handled automatically client-side, as long as it is calculated correctly server side there is no issue (unless the server hits a spot of bad lag)

* Better client/server time sync when lagging
This commit is contained in:
Dylan K. Taylor 2016-10-02 12:54:27 +01:00 committed by GitHub
parent 5f26c21b9f
commit e9f2bf0085

View File

@ -156,8 +156,6 @@ class Level implements ChunkManager, Metadatable{
private $cacheChunks = false;
private $sendTimeTicker = 0;
/** @var Server */
private $server;
@ -612,7 +610,7 @@ class Level implements ChunkManager, Metadatable{
if($this->stopTime === true){
return;
}else{
$this->time += 1;
$this->time += $this->tickRate;
}
}
@ -641,11 +639,6 @@ class Level implements ChunkManager, Metadatable{
$this->checkTime();
if(++$this->sendTimeTicker === 200){
$this->sendTime();
$this->sendTimeTicker = 0;
}
$this->unloadChunks();
//Do block updates