fix chunks with entities & tiles not being saved after first autosave

this bug was introduced by 211836274f, which did not take into consideration that the dirty flag is cleared after the first time the chunk is saved, meaning that later entity and tile changes wouldn't be saved.
I considered this fix more elegant than reverting the bug commit.
This commit is contained in:
Dylan K. Taylor
2019-07-29 19:38:47 +01:00
parent 2ecdea2cc6
commit cf1b140d57

View File

@ -618,7 +618,7 @@ class Chunk{
* @return bool
*/
public function hasChanged() : bool{
return $this->hasChanged;
return $this->hasChanged or !empty($this->tiles) or !empty($this->getSavableEntities());
}
/**