mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 20:07:09 +00:00
Stem: do not disable ticking when the stem is not attached to a pumpkin
fixes #6131
This commit is contained in:
parent
07dff9c9e8
commit
8aaa6dd176
@ -58,6 +58,10 @@ abstract class Stem extends Crops{
|
|||||||
parent::onNearbyBlockChange();
|
parent::onNearbyBlockChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ticksRandomly() : bool{
|
||||||
|
return $this->age < self::MAX_AGE || $this->facing === Facing::UP;
|
||||||
|
}
|
||||||
|
|
||||||
public function onRandomTick() : void{
|
public function onRandomTick() : void{
|
||||||
if($this->facing === Facing::UP && mt_rand(0, 2) === 1){
|
if($this->facing === Facing::UP && mt_rand(0, 2) === 1){
|
||||||
$world = $this->position->getWorld();
|
$world = $this->position->getWorld();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user