mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Merge branch 'release/3.4'
This commit is contained in:
commit
7642298b4f
@ -961,13 +961,20 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
foreach($this->chunkTickList as $index => $loaders){
|
foreach($this->chunkTickList as $index => $loaders){
|
||||||
Level::getXZ($index, $chunkX, $chunkZ);
|
Level::getXZ($index, $chunkX, $chunkZ);
|
||||||
|
|
||||||
if(($chunk = $this->chunks[$index] ?? null) === null){
|
for($cx = -1; $cx <= 1; ++$cx){
|
||||||
unset($this->chunkTickList[$index]);
|
for($cz = -1; $cz <= 1; ++$cz){
|
||||||
continue;
|
if(!isset($this->chunks[Level::chunkHash($chunkX + $cx, $chunkZ + $cz)])){
|
||||||
}elseif($loaders <= 0){
|
unset($this->chunkTickList[$index]);
|
||||||
|
goto skip_to_next; //no "continue 3" thanks!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($loaders <= 0){
|
||||||
unset($this->chunkTickList[$index]);
|
unset($this->chunkTickList[$index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$chunk = $this->chunks[$index];
|
||||||
foreach($chunk->getEntities() as $entity){
|
foreach($chunk->getEntities() as $entity){
|
||||||
$entity->scheduleUpdate();
|
$entity->scheduleUpdate();
|
||||||
}
|
}
|
||||||
@ -995,6 +1002,8 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skip_to_next: //dummy label to break out of nested loops
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->clearChunksOnTick){
|
if($this->clearChunksOnTick){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user