From cf1b140d5747037167b085784a0145dc10c85b6b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 29 Jul 2019 19:38:47 +0100 Subject: [PATCH] fix chunks with entities & tiles not being saved after first autosave this bug was introduced by 211836274f7008b83cab6f5ec40be539bff159d7, 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. --- src/pocketmine/world/format/Chunk.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/world/format/Chunk.php b/src/pocketmine/world/format/Chunk.php index 4d3df4e0a..d083a61e2 100644 --- a/src/pocketmine/world/format/Chunk.php +++ b/src/pocketmine/world/format/Chunk.php @@ -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()); } /**