asItem() ]; } public function isAffectedBySilkTouch() : bool{ return true; } public function ticksRandomly() : bool{ return true; } public function onRandomTick() : void{ //TODO: light levels $x = mt_rand($this->position->x - 1, $this->position->x + 1); $y = mt_rand($this->position->y - 2, $this->position->y + 2); $z = mt_rand($this->position->z - 1, $this->position->z + 1); $world = $this->position->getWorld(); $block = $world->getBlockAt($x, $y, $z); if($block instanceof Dirt && $block->getDirtType() === DirtType::NORMAL){ if($block->getSide(Facing::UP) instanceof Transparent){ BlockEventHelper::spread($block, VanillaBlocks::MYCELIUM(), $this); } } } }