Skip to content

LightUpdate ​

abstract class · pocketmine\world\light\LightUpdate · source

Constants ​

BASE_LIGHT_FILTER ​

php
public const BASE_LIGHT_FILTER = 1

Properties ​

$lightFilters ​

php
public array $lightFilters

$subChunkExplorer ​

php
public \pocketmine\world\utils\SubChunkExplorer $subChunkExplorer

$updateNodes protected ​

php
protected array $updateNodes

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\utils\SubChunkExplorer $subChunkExplorer, array $lightFilters)

computeRemoveLight() protected ​

php
protected function computeRemoveLight(int $x, int $y, int $z, int $oldAdjacentLevel, \pocketmine\world\light\LightPropagationContext $context, \pocketmine\world\format\LightArray $lightArray) : void

computeSpreadLight() protected ​

php
protected function computeSpreadLight(int $x, int $y, int $z, int $newAdjacentLevel, \pocketmine\world\light\LightPropagationContext $context, \pocketmine\world\format\LightArray $lightArray, \pocketmine\world\format\SubChunk $subChunk, int $side) : void

execute() ​

php
public function execute() : int

getCurrentLightArray() protected ​

php
abstract protected function getCurrentLightArray() : \pocketmine\world\format\LightArray

getEffectiveLight() protected ​

php
protected function getEffectiveLight(int $x, int $y, int $z) : int

getHighestAdjacentLight() protected ​

php
protected function getHighestAdjacentLight(int $x, int $y, int $z) : int

recalculateChunk() ​

php
abstract public function recalculateChunk(int $chunkX, int $chunkZ) : int

Scans for all light sources in the target chunk and adds them to the propagation queue. This erases preexisting light in the chunk.

recalculateNode() ​

php
abstract public function recalculateNode(int $x, int $y, int $z) : void

setAndUpdateLight() ​

php
public function setAndUpdateLight(int $x, int $y, int $z, int $newLevel) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.