mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12643390650
This commit is contained in:
@ -1364,7 +1364,7 @@ class World implements ChunkManager{
|
||||
* TODO: phpstan can't infer these types yet :(
|
||||
* @phpstan-var array<int, LightArray> $blockLight
|
||||
* @phpstan-var array<int, LightArray> $skyLight
|
||||
* @phpstan-var array<int, int> $heightMap
|
||||
* @phpstan-var non-empty-list<int> $heightMap
|
||||
*/
|
||||
if($this->unloaded || ($chunk = $this->getChunk($chunkX, $chunkZ)) === null || $chunk->isLightPopulated() === true){
|
||||
return;
|
||||
@ -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);
|
||||
@ -2021,7 +2022,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){
|
||||
@ -3064,6 +3064,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();
|
||||
/*
|
||||
@ -3235,6 +3236,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