mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Disable random ticking for some blocks depending on their states
we don't need to waste CPU time attempting to tick fully grown crops.
This commit is contained in:
@ -99,7 +99,7 @@ class CocoaBlock extends Transparent{
|
||||
}
|
||||
|
||||
public function ticksRandomly() : bool{
|
||||
return true;
|
||||
return $this->age < self::MAX_AGE;
|
||||
}
|
||||
|
||||
public function onRandomTick() : void{
|
||||
|
Reference in New Issue
Block a user