pocketmine\level\format\mcregion\Chunk::setBlockSkyLight PHP Method

setBlockSkyLight() public method

public setBlockSkyLight ( $x, $y, $z, $level )
    public function setBlockSkyLight($x, $y, $z, $level)
    {
        $i = $x << 10 | $z << 6 | $y >> 1;
        $old_sl = ord($this->skyLight[$i]);
        if (($y & 1) === 0) {
            $this->skyLight[$i] = chr($old_sl & 0xf0 | $level & 0xf);
        } else {
            $this->skyLight[$i] = chr(($level & 0xf) << 4 | $old_sl & 0xf);
        }
        $this->hasChanged = true;
    }