mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
fix PHPStan failure
setDirtyFlag has a void return type, so PHPStan assumes it's non-pure and invalidates the type info.
This commit is contained in:
parent
058a3b3fa6
commit
4b46549cd1
@ -2268,7 +2268,6 @@ class World implements ChunkManager{
|
||||
|
||||
private function initChunk(Chunk $chunk) : void{
|
||||
if($chunk->NBTentities !== null){
|
||||
$chunk->setDirtyFlag(Chunk::DIRTY_FLAG_ENTITIES, true);
|
||||
$this->timings->syncChunkLoadEntitiesTimer->startTiming();
|
||||
$entityFactory = EntityFactory::getInstance();
|
||||
foreach($chunk->NBTentities as $nbt){
|
||||
@ -2291,11 +2290,11 @@ class World implements ChunkManager{
|
||||
}
|
||||
}
|
||||
|
||||
$chunk->setDirtyFlag(Chunk::DIRTY_FLAG_ENTITIES, true);
|
||||
$chunk->NBTentities = null;
|
||||
$this->timings->syncChunkLoadEntitiesTimer->stopTiming();
|
||||
}
|
||||
if($chunk->NBTtiles !== null){
|
||||
$chunk->setDirtyFlag(Chunk::DIRTY_FLAG_TILES, true);
|
||||
$this->timings->syncChunkLoadTileEntitiesTimer->startTiming();
|
||||
$tileFactory = TileFactory::getInstance();
|
||||
foreach($chunk->NBTtiles as $nbt){
|
||||
@ -2307,6 +2306,7 @@ class World implements ChunkManager{
|
||||
}
|
||||
}
|
||||
|
||||
$chunk->setDirtyFlag(Chunk::DIRTY_FLAG_TILES, true);
|
||||
$chunk->NBTtiles = null;
|
||||
$this->timings->syncChunkLoadTileEntitiesTimer->stopTiming();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user