mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +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:
@ -62,7 +62,7 @@ abstract class Crops extends Flowable{
|
||||
}
|
||||
|
||||
public function ticksRandomly() : bool{
|
||||
return true;
|
||||
return $this->age < self::MAX_AGE;
|
||||
}
|
||||
|
||||
public function onRandomTick() : void{
|
||||
|
Reference in New Issue
Block a user