pocketmine\level\ChunkManager::updateBlockLight PHP Метод

updateBlockLight() публичный Метод

Updates the light around the block
public updateBlockLight ( integer $x, integer $y, integer $z )
$x integer
$y integer
$z integer
    public function updateBlockLight(int $x, int $y, int $z);

Usage Example

Пример #1
0
 public function populate(ChunkManager $level, $chunkX, $chunkZ, Random $random)
 {
     $this->level = $level;
     $amount = $random->nextRange(0, $this->randomAmount + 1) + $this->baseAmount;
     for ($i = 0; $i < $amount; ++$i) {
         $x = $random->nextRange($chunkX * 16, $chunkX * 16 + 15);
         $z = $random->nextRange($chunkZ * 16, $chunkZ * 16 + 15);
         $y = $this->getHighestWorkableBlock($x, $z);
         //echo "Fire to $x, $y, $z\n";
         if ($y !== -1 and $this->canGroundFireStay($x, $y, $z)) {
             $this->level->setBlockIdAt($x, $y, $z, Block::FIRE);
             $this->level->updateBlockLight($x, $y, $z);
         }
     }
 }
All Usage Examples Of pocketmine\level\ChunkManager::updateBlockLight