Chunk save: skip entities which won't be saved anyway

don't just hardcode this to players
This commit is contained in:
Dylan K. Taylor 2017-11-19 17:57:54 +00:00
parent 2fd61163bf
commit 19dc22d6b3

View File

@ -2643,7 +2643,7 @@ class Level implements ChunkManager, Metadatable{
if($trySave and $this->getAutoSave() and $chunk->isGenerated()){
$entities = 0;
foreach($chunk->getEntities() as $e){
if($e instanceof Player){
if(!$e->canSaveWithChunk()){
continue;
}
++$entities;