I have been working on doing this todo (https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/level/Level.php#L1289) in the last 3 weeks, and a PR will probably be submitted within the next week. This thread is meant for dicussion about this upcoming PR/feature (how it should be implemented and mainly, should i put some usage in already (example: grass) or make a seperate PR.) I will provide more info soon(ish). If this is at the wrong place, sorry I am new here (probably everyone is )
That's the current debug output.. Hello there, I'm still trying to get this done. The calculation almost does things right, it is just still struggling with vertical light. There are some problems to be resolved: When should the skylight be calculated? I couldn't quite figure out if light is calculated on chunk load. SkyLight theoretically needs to be recalculated overtime anything changes in XZ+-15 blocks. This would be awful for performance.
I just managed adding a forgotten return; that brought performance back. I also moved one line and suddenly realised that almost everything works. I just have to improve performance and squash the little bugs that are flying around. It is funny how some small changes can change everything for the good.
Thanks for all the support! I just got most the freezes sorted out (some constellations still cause a loop), and managed to get many things working. I'm now mainly working on the trouble with the recursive call control, performance, bug fixing and some cleanup before releasing it to the public. Here are Theoretically everything would just work perfectly. I just have to deal with the recursive call control. some pics:
PROGRESS! Huge progress! I have got all the freezes really sorted out, and I am now working on performance (it takes over 0.1s )
I have published it now, no PR created yet: https://github.com/pmmp/PocketMine-MP/compare/master...robske110:skylight
Hello there! I am now almost done with this. There is just one feature to add. If you want to help me, you can view the instructions "How can I test this" on github. https://github.com/pmmp/PocketMine-MP/pull/160