Backport 6bd43a8215: Firehose auto-tick-rate anti-feature, closes #2665

This commit is contained in:
Dylan K. Taylor
2019-03-03 13:24:53 +00:00
parent 10612acace
commit 0659d2fbef
4 changed files with 15 additions and 56 deletions

View File

@ -261,12 +261,8 @@ class Level implements ChunkManager, Metadatable{
/** @var LevelTimings */
public $timings;
/** @var int */
private $tickRate;
/** @var int */
public $tickRateTime = 0;
/** @var int */
public $tickRateCounter = 0;
/** @var bool */
private $doingTick = false;
@ -411,19 +407,26 @@ class Level implements ChunkManager, Metadatable{
$this->timings = new LevelTimings($this);
$this->temporalPosition = new Position(0, 0, 0, $this);
$this->temporalVector = new Vector3(0, 0, 0);
$this->tickRate = 1;
}
/**
* @deprecated
* @return int
*/
public function getTickRate() : int{
return $this->tickRate;
return 1;
}
public function getTickRateTime() : float{
return $this->tickRateTime;
}
/**
* @deprecated does nothing
* @param int $tickRate
*/
public function setTickRate(int $tickRate){
$this->tickRate = $tickRate;
}
public function registerGeneratorToWorker(int $worker) : void{