mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +00:00
SubChunkIteratorManager: added isValid()
This commit is contained in:
parent
21e9bca64a
commit
f3f9ebf312
@ -85,6 +85,15 @@ class SubChunkIteratorManager{
|
||||
$this->onSubChunkChangeFunc = $callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether we currently have a valid terrain pointer.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid() : bool{
|
||||
return $this->currentSubChunk !== null;
|
||||
}
|
||||
|
||||
public function invalidate() : void{
|
||||
$this->currentChunk = null;
|
||||
$this->currentSubChunk = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user