mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Improve PHPDocs in world package
This commit is contained in:
@ -1562,6 +1562,7 @@ class World implements ChunkManager{
|
||||
* Larger AABBs (>= 2 blocks on any axis) are not accounted for.
|
||||
*
|
||||
* @return AxisAlignedBB[]
|
||||
* @phpstan-return list<AxisAlignedBB>
|
||||
*/
|
||||
private function getBlockCollisionBoxesForCell(int $x, int $y, int $z) : array{
|
||||
$block = $this->getBlockAt($x, $y, $z);
|
||||
@ -2040,7 +2041,6 @@ class World implements ChunkManager{
|
||||
* @phpstan-return list<ExperienceOrb>
|
||||
*/
|
||||
public function dropExperience(Vector3 $pos, int $amount) : array{
|
||||
/** @var ExperienceOrb[] $orbs */
|
||||
$orbs = [];
|
||||
|
||||
foreach(ExperienceOrb::splitIntoOrbSizes($amount) as $split){
|
||||
@ -3083,6 +3083,7 @@ class World implements ChunkManager{
|
||||
* @phpstan-return Promise<Position>
|
||||
*/
|
||||
public function requestSafeSpawn(?Vector3 $spawn = null) : Promise{
|
||||
/** @phpstan-var PromiseResolver<Position> $resolver */
|
||||
$resolver = new PromiseResolver();
|
||||
$spawn ??= $this->getSpawnLocation();
|
||||
/*
|
||||
@ -3254,6 +3255,7 @@ class World implements ChunkManager{
|
||||
private function enqueuePopulationRequest(int $chunkX, int $chunkZ, ?ChunkLoader $associatedChunkLoader) : Promise{
|
||||
$chunkHash = World::chunkHash($chunkX, $chunkZ);
|
||||
$this->addChunkHashToPopulationRequestQueue($chunkHash);
|
||||
/** @phpstan-var PromiseResolver<Chunk> $resolver */
|
||||
$resolver = $this->chunkPopulationRequestMap[$chunkHash] = new PromiseResolver();
|
||||
if($associatedChunkLoader === null){
|
||||
$temporaryLoader = new class implements ChunkLoader{};
|
||||
|
Reference in New Issue
Block a user