mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
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:
@ -618,7 +618,7 @@ class Chunk{
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasChanged() : bool{
|
public function hasChanged() : bool{
|
||||||
return $this->hasChanged;
|
return $this->hasChanged or !empty($this->tiles) or !empty($this->getSavableEntities());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user