mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Player: Loading chunks to spawn entities is a bug
again, this would never happen except in bug circumstances, but if there was a bug, it should crash instead of trying to load chunks to paper over it.
This commit is contained in:
@ -747,7 +747,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function spawnEntitiesOnChunk(int $chunkX, int $chunkZ) : void{
|
protected function spawnEntitiesOnChunk(int $chunkX, int $chunkZ) : void{
|
||||||
foreach($this->getWorld()->getOrLoadChunk($chunkX, $chunkZ)->getEntities() as $entity){
|
foreach($this->getWorld()->getChunk($chunkX, $chunkZ)->getEntities() as $entity){
|
||||||
if($entity !== $this and !$entity->isFlaggedForDespawn()){
|
if($entity !== $this and !$entity->isFlaggedForDespawn()){
|
||||||
$entity->spawnTo($this);
|
$entity->spawnTo($this);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user