mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 16:29:40 +00:00
SubChunkIteratorManager: assert type of subchunk to make PHPStan happy
we know this should be a SubChunk, even though it doesn't.
This commit is contained in:
parent
e35a92d8e8
commit
60154d8127
@ -71,7 +71,9 @@ class SubChunkIteratorManager{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->currentSubChunk = $this->currentChunk->getSubChunk($y >> 4);
|
$newSubChunk = $this->currentChunk->getSubChunk($y >> 4);
|
||||||
|
assert($newSubChunk instanceof SubChunk, "chunk inside valid bounds should always be a SubChunk instance");
|
||||||
|
$this->currentSubChunk = $newSubChunk;
|
||||||
if($this->onSubChunkChangeFunc !== null){
|
if($this->onSubChunkChangeFunc !== null){
|
||||||
($this->onSubChunkChangeFunc)();
|
($this->onSubChunkChangeFunc)();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user