From b7471fc77b53c0cddcc52fe6bdf630e446167e55 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 20 Sep 2020 13:40:44 +0100 Subject: [PATCH] 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. --- src/player/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player/Player.php b/src/player/Player.php index 9d9f8b607..1a00dc2c2 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -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); }