mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Fixed some issues with world generation and not creating chunks, closes #3008
This commit is contained in:
@ -120,7 +120,7 @@ class Anvil extends McRegion{
|
||||
}
|
||||
|
||||
public function isChunkGenerated($chunkX, $chunkZ){
|
||||
if(($region = $this->getRegion($chunkX >> 5, $chunkZ >> 5)) instanceof RegionLoader){
|
||||
if(($region = $this->getRegion($chunkX >> 5, $chunkZ >> 5)) !== null){
|
||||
return $region->chunkExists($chunkX - $region->getX() * 32, $chunkZ - $region->getZ() * 32) and $this->getChunk($chunkX - $region->getX() * 32, $chunkZ - $region->getZ() * 32, true)->isGenerated();
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ class McRegion extends BaseLevelProvider{
|
||||
}
|
||||
|
||||
public function isChunkGenerated($chunkX, $chunkZ){
|
||||
if(($region = $this->getRegion($chunkX >> 5, $chunkZ >> 5)) instanceof RegionLoader){
|
||||
if(($region = $this->getRegion($chunkX >> 5, $chunkZ >> 5)) !== null){
|
||||
return $region->chunkExists($chunkX - $region->getX() * 32, $chunkZ - $region->getZ() * 32) and $this->getChunk($chunkX - $region->getX() * 32, $chunkZ - $region->getZ() * 32, true)->isGenerated();
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ class McRegion extends BaseLevelProvider{
|
||||
|
||||
public function isChunkPopulated($chunkX, $chunkZ){
|
||||
$chunk = $this->getChunk($chunkX, $chunkZ);
|
||||
if($chunk instanceof FullChunk){
|
||||
if($chunk !== null){
|
||||
return $chunk->isPopulated();
|
||||
}else{
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user