mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-29 14:49:59 +00:00
SubChunkIteratorManager: added isValid()
This commit is contained in:
parent
21e9bca64a
commit
f3f9ebf312
@ -85,6 +85,15 @@ class SubChunkIteratorManager{
|
|||||||
$this->onSubChunkChangeFunc = $callback;
|
$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{
|
public function invalidate() : void{
|
||||||
$this->currentChunk = null;
|
$this->currentChunk = null;
|
||||||
$this->currentSubChunk = null;
|
$this->currentSubChunk = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user