pocketmine\level\Level::getFullLight PHP Method

getFullLight() public method

$block = $this->getBlock(Vector3::createVector($x1, $y1, $z1)); if(!$flag1 or $block->getBoundingBox() !== null){ $ob = $block->calculateIntercept($pos1, $pos2); if($ob !== null){ return $ob; } } $movingObjectPosition = null; $k = 200; while($k-- >= 0){ if(is_nan($pos1->x) or is_nan($pos1->y) or is_nan($pos1->z)){ return null; } if($x1 === $x2 and $y1 === $y2 and $z1 === $z2){ return $flag2 ? $movingObjectPosition : null; } $flag3 = true; $flag4 = true; $flag5 = true; $i = 999; $j = 999; $k = 999; if($x1 > $x2){ $i = $x2 + 1; }elseif($x1 < $x2){ $i = $x2; }else{ $flag3 = false; } if($y1 > $y2){ $j = $y2 + 1; }elseif($y1 < $y2){ $j = $y2; }else{ $flag4 = false; } if($z1 > $z2){ $k = $z2 + 1; }elseif($z1 < $z2){ $k = $z2; }else{ $flag5 = false; } TODO } } } }
public getFullLight ( Vector3 $pos ) : integer
$pos pocketmine\math\Vector3
return integer
    public function getFullLight(Vector3 $pos) : int
    {
        $chunk = $this->getChunk($pos->x >> 4, $pos->z >> 4, false);
        $level = 0;
        if ($chunk !== null) {
            $level = $chunk->getBlockSkyLight($pos->x & 0xf, $pos->y & 0x7f, $pos->z & 0xf);
            //TODO: decrease light level by time of day
            if ($level < 15) {
                $level = max($chunk->getBlockLight($pos->x & 0xf, $pos->y & 0x7f, $pos->z & 0xf));
            }
        }
        return $level;
    }
Level