Player: revert accidental change from ef100b248b72dbe0238abd202c4d1ac11ff375ee

This commit is contained in:
Dylan K. Taylor 2022-11-12 14:43:22 +00:00
parent d5e3636908
commit 732dac6fc1
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -300,6 +300,14 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$this->chunkLoader = new PlayerChunkLoader($spawnLocation);
$world = $spawnLocation->getWorld();
//load the spawn chunk so we can see the terrain
$xSpawnChunk = $spawnLocation->getFloorX() >> Chunk::COORD_BIT_SIZE;
$zSpawnChunk = $spawnLocation->getFloorZ() >> Chunk::COORD_BIT_SIZE;
$world->registerChunkLoader($this->chunkLoader, $xSpawnChunk, $zSpawnChunk, true);
$world->registerChunkListener($this, $xSpawnChunk, $zSpawnChunk);
$this->usedChunks[World::chunkHash($xSpawnChunk, $zSpawnChunk)] = UsedChunkStatus::NEEDED();
parent::__construct($spawnLocation, $this->playerInfo->getSkin(), $namedtag);
}