pocketmine\level\Level::computeSpreadBlockLight PHP Method

computeSpreadBlockLight() private method

private computeSpreadBlockLight ( integer $x, integer $y, integer $z, integer $currentLight, SplQueue $queue, array &$visited )
$x integer
$y integer
$z integer
$currentLight integer
$queue SplQueue
$visited array
    private function computeSpreadBlockLight(int $x, int $y, int $z, int $currentLight, \SplQueue $queue, array &$visited)
    {
        $current = $this->getBlockLightAt($x, $y, $z);
        if ($current < $currentLight) {
            $this->setBlockLightAt($x, $y, $z, $currentLight);
            if (!isset($visited[$index = Level::blockHash($x, $y, $z)])) {
                $visited[$index] = true;
                if ($currentLight > 1) {
                    $queue->enqueue(new Vector3($x, $y, $z));
                }
            }
        }
    }
Level