Level: fixed autosave not kicking in when entities are updated in a chunk (e.g. moving, dying, spawning)

This commit is contained in:
Dylan K. Taylor 2018-03-15 09:46:04 +00:00
parent bf97eab98f
commit a2af838b1d

View File

@ -1068,7 +1068,7 @@ class Level implements ChunkManager, Metadatable{
public function saveChunks(){
foreach($this->chunks as $chunk){
if($chunk->hasChanged() and $chunk->isGenerated()){
if(($chunk->hasChanged() or count($chunk->getTiles()) > 0 or count($chunk->getSavableEntities()) > 0) and $chunk->isGenerated()){
$this->provider->saveChunk($chunk);
$chunk->setChanged(false);
}