From 787e8ba5c80779eb956b38453fa44d6e38561116 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Wed, 28 Oct 2015 19:05:58 -1000 Subject: [PATCH] Fix deleted chunks not being purged from caches. --- src/mceditlib/worldeditor.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mceditlib/worldeditor.py b/src/mceditlib/worldeditor.py index 7bf796b..90221a4 100644 --- a/src/mceditlib/worldeditor.py +++ b/src/mceditlib/worldeditor.py @@ -539,6 +539,16 @@ class WorldEditor(object): if self._allChunks is not None: self._allChunks[dimName].discard((cx, cz)) + self._chunkDataCache.decache(cx, cz, dimName) + chunk = None + for c in self.recentChunks: + if c.chunkPosition == (cx, cz) and c.dimName == dimName: + chunk = c + break + + if chunk: + self.recentChunks.remove(chunk) + # --- World metadata --- def getWorldMetadata(self):