McRegion: Added an assert

This commit is contained in:
Dylan K. Taylor 2017-12-30 19:49:44 +00:00
parent 4db7a7e57f
commit 1e896efff9

View File

@ -336,10 +336,11 @@ class McRegion extends BaseLevelProvider{
}
$regionX = $regionZ = null;
self::getRegionIndex($chunkX, $chunkZ, $regionX, $regionZ);
/** @noinspection PhpStrictTypeCheckingInspection */
assert(is_int($regionX) and is_int($regionZ));
$this->loadRegion($regionX, $regionZ);
$this->level->timings->syncChunkLoadDataTimer->startTiming();
/** @noinspection PhpStrictTypeCheckingInspection */
$chunk = $this->getRegion($regionX, $regionZ)->readChunk($chunkX & 0x1f, $chunkZ & 0x1f);
if($chunk === null and $create){
$chunk = new Chunk($chunkX, $chunkZ);