mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
SubChunkExplorer::moveTo() now returns a status
this can be used by SubChunkExplorer subclasses to implement specialized logic.
This commit is contained in:
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\world\light;
|
||||
|
||||
use pocketmine\world\utils\SubChunkExplorer;
|
||||
use pocketmine\world\utils\SubChunkExplorerStatus;
|
||||
use pocketmine\world\World;
|
||||
use function max;
|
||||
|
||||
@ -59,7 +60,7 @@ class SkyLightUpdate extends LightUpdate{
|
||||
}
|
||||
|
||||
public function recalculateNode(int $x, int $y, int $z) : void{
|
||||
if(!$this->subChunkExplorer->moveTo($x, $y, $z, false)){
|
||||
if($this->subChunkExplorer->moveTo($x, $y, $z, false) === SubChunkExplorerStatus::INVALID){
|
||||
return;
|
||||
}
|
||||
$chunk = $this->subChunkExplorer->currentChunk;
|
||||
|
Reference in New Issue
Block a user