I'm making this an issue because I'm trying to make it easier to start contributing and this seems like a good first issue.
Currently when above or below the world, the light level is set to the default value (0). To match vanilla's behaviour, it seems like when above the world, you get the light value of the block in the same column but at y level 256, and when below the world, you get the value of the block in the same column but at y level -1. Because of the way the lighting engine works, light levels are calculated from y level -1 (1 below the world) to y level 256 (1 above the world) inclusive, and Delta Client does this already. The only part that needs to be implemented is checking if the requested block is outside those bounds and if it is, calculate the equivalent position (a little more involved when block indices are used instead of positions) and use that instead.
I'm making this an issue because I'm trying to make it easier to start contributing and this seems like a good first issue.
Currently when above or below the world, the light level is set to the default value (0). To match vanilla's behaviour, it seems like when above the world, you get the light value of the block in the same column but at y level 256, and when below the world, you get the value of the block in the same column but at y level -1. Because of the way the lighting engine works, light levels are calculated from y level -1 (1 below the world) to y level 256 (1 above the world) inclusive, and Delta Client does this already. The only part that needs to be implemented is checking if the requested block is outside those bounds and if it is, calculate the equivalent position (a little more involved when block indices are used instead of positions) and use that instead.