Hello! I'm working on a monster generator and I have to get the light level of a random location, and if it meets light level 7 or lower (and other requirements) it should spawn a monster. I'm struggling however with getting the light level of the positions. I have tried several ways to get the light level, but it didn't work the way I wanted. I var_dumped several ways: PHP: var_dump($level->getBlockLightAt($x, $y, $z)); //returns int 0, or higher if light source is near.var_dump($level->getBlockSkyLightAt($x, $y, $z)); //returns int 0 or higher if light source is near as well! I'm not sure what I'm doing wrong, or if this is a PocketMine issue, but it would be greatly appreciated if someone could look at it. If you want the full code, here it is: https://github.com/RevivalPMMP/Pure...icode/pureentities/task/AutoSpawnTask.php#L66 I need to get the light level the block has with the actual sky light added to it. Thanks in advance!
It would be getFullLight(). But skylight is not yet implemented into pm. (Refer to: https://forums.pmmp.io/threads/implementing-skylight-into-pmmp.19/ and https://github.com/pmmp/PocketMine-MP/pull/160)