Stem: do not disable ticking when the stem is not attached to a pumpkin

fixes #6131
This commit is contained in:
Dylan K. Taylor 2023-11-02 14:47:55 +00:00
parent 07dff9c9e8
commit 8aaa6dd176
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -58,6 +58,10 @@ abstract class Stem extends Crops{
parent::onNearbyBlockChange();
}
public function ticksRandomly() : bool{
return $this->age < self::MAX_AGE || $this->facing === Facing::UP;
}
public function onRandomTick() : void{
if($this->facing === Facing::UP && mt_rand(0, 2) === 1){
$world = $this->position->getWorld();