PocketMine-MP 5.35.1 git-e32e836dad793a3a3c8ddd8927c00e112b1e576a
Loading...
Searching...
No Matches
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, Facing $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 33 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 40 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 185 of file LightUpdate.php.

◆ computeSpreadLight()

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

Definition at line 208 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 48 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 73 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 52 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: