mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 03:47:16 +00:00
sanity check
This commit is contained in:
parent
65ef9f786a
commit
facfd7c04a
@ -2928,6 +2928,9 @@ class World implements ChunkManager{
|
||||
|
||||
foreach($adjacentChunks as $relativeChunkHash => $adjacentChunk){
|
||||
World::getXZ($relativeChunkHash, $relativeX, $relativeZ);
|
||||
if($relativeX < -1 || $relativeX > 1 || $relativeZ < -1 || $relativeZ > 1){
|
||||
throw new AssumptionFailedError("Adjacent chunks should be in range -1 ... +1 coordinates");
|
||||
}
|
||||
$this->setChunk($x + $relativeX, $z + $relativeZ, $adjacentChunk);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user