PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
Loading...
Searching...
No Matches
pocketmine\world\light\LightUpdate Class Reference
+ Inheritance diagram for pocketmine\world\light\LightUpdate:
+ Collaboration diagram for pocketmine\world\light\LightUpdate:

Public Member Functions

 __construct (protected SubChunkExplorer $subChunkExplorer, protected array $lightFilters)
 
 execute ()
 
 recalculateChunk (int $chunkX, int $chunkZ)
 
 recalculateNode (int $x, int $y, int $z)
 
 setAndUpdateLight (int $x, int $y, int $z, int $newLevel)
 

Public Attributes

const BASE_LIGHT_FILTER = 1
 

Protected Member Functions

 computeRemoveLight (int $x, int $y, int $z, int $oldAdjacentLevel, LightPropagationContext $context, LightArray $lightArray)
 
 computeSpreadLight (int $x, int $y, int $z, int $newAdjacentLevel, LightPropagationContext $context, LightArray $lightArray, SubChunk $subChunk, int $side)
 
 getCurrentLightArray ()
 
 getEffectiveLight (int $x, int $y, int $z)
 
 getHighestAdjacentLight (int $x, int $y, int $z)
 

Protected Attributes

array $updateNodes = []
 

Detailed Description

Definition at line 36 of file LightUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\world\light\LightUpdate::__construct ( protected SubChunkExplorer $subChunkExplorer,
protected array $lightFilters )
Parameters
int[]$lightFilters@phpstan-param array<int, int> $lightFilters

Definition at line 49 of file LightUpdate.php.

Member Function Documentation

◆ computeRemoveLight()

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

Definition at line 184 of file LightUpdate.php.

◆ computeSpreadLight()

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

Definition at line 207 of file LightUpdate.php.

◆ execute()

pocketmine\world\light\LightUpdate::execute ( )

Definition at line 107 of file LightUpdate.php.

◆ getEffectiveLight()

pocketmine\world\light\LightUpdate::getEffectiveLight ( int $x,
int $y,
int $z )
protected

Definition at line 64 of file LightUpdate.php.

◆ getHighestAdjacentLight()

pocketmine\world\light\LightUpdate::getHighestAdjacentLight ( int $x,
int $y,
int $z )
protected

Definition at line 71 of file LightUpdate.php.

◆ recalculateChunk()

pocketmine\world\light\LightUpdate::recalculateChunk ( int $chunkX,
int $chunkZ )
abstract

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

Reimplemented in pocketmine\world\light\BlockLightUpdate, and pocketmine\world\light\SkyLightUpdate.

◆ setAndUpdateLight()

pocketmine\world\light\LightUpdate::setAndUpdateLight ( int $x,
int $y,
int $z,
int $newLevel )

Definition at line 81 of file LightUpdate.php.

Member Data Documentation

◆ $updateNodes

array pocketmine\world\light\LightUpdate::$updateNodes = []
protected

Definition at line 43 of file LightUpdate.php.

◆ BASE_LIGHT_FILTER

const pocketmine\world\light\LightUpdate::BASE_LIGHT_FILTER = 1

Definition at line 37 of file LightUpdate.php.


The documentation for this class was generated from the following file: