add chunkIsCompressed/Dirty, clean up chunkIsLoaded

This commit is contained in:
David Vierra 2011-06-30 14:11:49 -10:00
parent 91490dfd10
commit 346b0aab99

View File

@ -3208,9 +3208,19 @@ class MCInfdevOldLevel(MCLevel):
def chunkIsLoaded(self, cx, cz):
if (cx,cz) in self._loadedChunks:
if( self._loadedChunks[(cx,cz)].compressedTag is not None or
self._loadedChunks[(cx,cz)].root_tag is not None):
return True
return self._loadedChunks[(cx,cz)].isLoaded()
return False
def chunkIsCompressed(self, cx, cz):
if (cx,cz) in self._loadedChunks:
return self._loadedChunks[(cx,cz)].isCompressed()
return False
def chunkIsDirty(self, cx, cz):
if (cx,cz) in self._loadedChunks:
return self._loadedChunks[(cx,cz)].dirty
return False