mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Player: don't spawn entities on out-of-sync chunks on join, closes #2911
This commit is contained in:
parent
6d64ef8d74
commit
c06b4830d1
@ -1086,7 +1086,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
|
||||
$this->noDamageTicks = 60;
|
||||
|
||||
foreach($this->usedChunks as $index => $c){
|
||||
foreach($this->usedChunks as $index => $hasSent){
|
||||
if(!$hasSent){
|
||||
continue; //this will happen when the chunk is ready to send
|
||||
}
|
||||
Level::getXZ($index, $chunkX, $chunkZ);
|
||||
foreach($this->level->getChunkEntities($chunkX, $chunkZ) as $entity){
|
||||
if($entity !== $this and !$entity->isClosed() and $entity->isAlive() and !$entity->isFlaggedForDespawn()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user