PocketMine-MP 5.16.1 git-585aee9386a787c95e73dd0a05ffca8329606b68
pocketmine\world\light\BlockLightUpdate Class Reference
+ Inheritance diagram for pocketmine\world\light\BlockLightUpdate:
+ Collaboration diagram for pocketmine\world\light\BlockLightUpdate:

Public Member Functions

 __construct (SubChunkExplorer $subChunkExplorer, array $lightFilters, private array $lightEmitters)
 
 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 32 of file BlockLightUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 39 of file BlockLightUpdate.php.

Member Function Documentation

◆ computeRemoveLight()

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

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 
)
protectedinherited

Definition at line 207 of file LightUpdate.php.

◆ execute()

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

Definition at line 107 of file LightUpdate.php.

◆ getCurrentLightArray()

pocketmine\world\light\BlockLightUpdate::getCurrentLightArray ( )
protected

Reimplemented from pocketmine\world\light\LightUpdate.

Definition at line 47 of file BlockLightUpdate.php.

◆ getEffectiveLight()

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

Definition at line 64 of file LightUpdate.php.

◆ getHighestAdjacentLight()

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

Definition at line 71 of file LightUpdate.php.

◆ recalculateChunk()

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

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

Reimplemented from pocketmine\world\light\LightUpdate.

Definition at line 58 of file BlockLightUpdate.php.

◆ recalculateNode()

pocketmine\world\light\BlockLightUpdate::recalculateNode ( int  $x,
int  $y,
int  $z 
)

Reimplemented from pocketmine\world\light\LightUpdate.

Definition at line 51 of file BlockLightUpdate.php.

◆ setAndUpdateLight()

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

Definition at line 81 of file LightUpdate.php.

Member Data Documentation

◆ $updateNodes

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

Definition at line 43 of file LightUpdate.php.

◆ BASE_LIGHT_FILTER

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

Definition at line 37 of file LightUpdate.php.


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