mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-27 13:49:55 +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:
parent
7f43164776
commit
b7471fc77b
@ -747,7 +747,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
}
|
||||
|
||||
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()){
|
||||
$entity->spawnTo($this);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user