LightUpdate
Constants
BASE_LIGHT_FILTER
php
public const BASE_LIGHT_FILTER = 1Properties
$lightFilters
php
public array $lightFilters$subChunkExplorer
php
public \pocketmine\world\utils\SubChunkExplorer $subChunkExplorer$updateNodes protected
php
protected array $updateNodesMethods
__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) : voidcomputeSpreadLight() 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) : voidexecute()
php
public function execute() : intgetCurrentLightArray() protected
php
abstract protected function getCurrentLightArray() : \pocketmine\world\format\LightArraygetEffectiveLight() protected
php
protected function getEffectiveLight(int $x, int $y, int $z) : intgetHighestAdjacentLight() protected
php
protected function getHighestAdjacentLight(int $x, int $y, int $z) : intrecalculateChunk()
php
abstract public function recalculateChunk(int $chunkX, int $chunkZ) : intScans 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) : voidsetAndUpdateLight()
php
public function setAndUpdateLight(int $x, int $y, int $z, int $newLevel) : void