mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Backport 6bd43a8215
: Firehose auto-tick-rate anti-feature, closes #2665
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user