mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Firehose auto-tick-rate anti-feature, closes #2665
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user