mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 12:27:51 +00:00
McRegion: Added an assert
This commit is contained in:
parent
4db7a7e57f
commit
1e896efff9
@ -336,10 +336,11 @@ class McRegion extends BaseLevelProvider{
|
|||||||
}
|
}
|
||||||
$regionX = $regionZ = null;
|
$regionX = $regionZ = null;
|
||||||
self::getRegionIndex($chunkX, $chunkZ, $regionX, $regionZ);
|
self::getRegionIndex($chunkX, $chunkZ, $regionX, $regionZ);
|
||||||
/** @noinspection PhpStrictTypeCheckingInspection */
|
assert(is_int($regionX) and is_int($regionZ));
|
||||||
|
|
||||||
$this->loadRegion($regionX, $regionZ);
|
$this->loadRegion($regionX, $regionZ);
|
||||||
$this->level->timings->syncChunkLoadDataTimer->startTiming();
|
$this->level->timings->syncChunkLoadDataTimer->startTiming();
|
||||||
/** @noinspection PhpStrictTypeCheckingInspection */
|
|
||||||
$chunk = $this->getRegion($regionX, $regionZ)->readChunk($chunkX & 0x1f, $chunkZ & 0x1f);
|
$chunk = $this->getRegion($regionX, $regionZ)->readChunk($chunkX & 0x1f, $chunkZ & 0x1f);
|
||||||
if($chunk === null and $create){
|
if($chunk === null and $create){
|
||||||
$chunk = new Chunk($chunkX, $chunkZ);
|
$chunk = new Chunk($chunkX, $chunkZ);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user