From efa22c0ccaa2d8d8b4f983b17d77b0a07eeafc5c Mon Sep 17 00:00:00 2001 From: David Vierra Date: Sat, 25 Sep 2010 19:25:42 -1000 Subject: [PATCH] added MCInfdevOldLevel.unload --- mclevel.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mclevel.py b/mclevel.py index 11bc93d..a139c7e 100644 --- a/mclevel.py +++ b/mclevel.py @@ -1308,6 +1308,13 @@ class InfdevChunk(MCLevel): if self.root_tag is None: self.decompress() + def unload(self): + """ Frees the chunk's memory. Saves the chunk to disk if needed. """ + self.compress(); + self.save(); + + self.compressedTag = None; + def isLoaded(self): #we're loaded if we have our tag data in ram #and we don't have to go back to the disk for it.