Implement cross-chunk-border lighting propagation #6555
Labels
Category: Core
Related to internal functionality
Category: Gameplay
Related to Minecraft gameplay experience
Performance
Type: Enhancement
Contributes features or other improvements to PocketMine-MP
Problem description
Crops in shadowed areas in e.g. overhangs will currently not grow correctly due to the lack of cross-chunk-border light propagation.
Basically: If the only available light source for crops is in an adjacent chunk, currently the crops won't know about the light from that light source, because we don't propagate it across chunk borders.
This would also lead to problems with mob spawning.
Proposed solution
Implement pass 2 light propagation as described here: https://github.com/dktapps/lighting-algorithm-spec?tab=readme-ov-file#pass-2-propagate-light-across-chunk-borders
We already have pass 1 light propagation (
Chunk->isLightPopulated() === true
means "has pass1 lighting").Why hasn't this been done already?
It's not hugely difficult, but it is a bit complicated to implement and doesn't provide a huge amount of benefit at present. It could also cause a hit to performance if done poorly.
Chunk
would need to add a set of flags to track which pass2 positions it's received light propagation fromAlternative solutions that don't require API changes
The text was updated successfully, but these errors were encountered: