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 d9880de2ef
commit 6bd43a8215
4 changed files with 4 additions and 65 deletions

View File

@ -256,12 +256,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;
@ -401,21 +397,12 @@ 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;
}
public function getTickRate() : int{
return $this->tickRate;
}
public function getTickRateTime() : float{
return $this->tickRateTime;
}
public function setTickRate(int $tickRate){
$this->tickRate = $tickRate;
}
public function registerGeneratorToWorker(int $worker) : void{
$this->generatorRegisteredWorkers[$worker] = true;
$this->server->getAsyncPool()->submitTaskToWorker(new GeneratorRegisterTask($this, $this->generator, $this->provider->getLevelData()->getGeneratorOptions()), $worker);