mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-09 11:31:49 +00:00
Chunk save: skip entities which won't be saved anyway
don't just hardcode this to players
This commit is contained in:
parent
2fd61163bf
commit
19dc22d6b3
@ -2643,7 +2643,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
if($trySave and $this->getAutoSave() and $chunk->isGenerated()){
|
if($trySave and $this->getAutoSave() and $chunk->isGenerated()){
|
||||||
$entities = 0;
|
$entities = 0;
|
||||||
foreach($chunk->getEntities() as $e){
|
foreach($chunk->getEntities() as $e){
|
||||||
if($e instanceof Player){
|
if(!$e->canSaveWithChunk()){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
++$entities;
|
++$entities;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user