add chunkIsLoaded test to MCInfdevOldLevel
This commit is contained in:
parent
cd2d0da161
commit
f15cd1992d
@ -2293,6 +2293,13 @@ class MCInfdevOldLevel(MCLevel):
|
|||||||
|
|
||||||
return self._loadedChunks[cx,cz]
|
return self._loadedChunks[cx,cz]
|
||||||
|
|
||||||
|
def chunkIsLoaded(self, cx, cz):
|
||||||
|
if (cx,cz) in self._loadedChunks:
|
||||||
|
if self._loadedChunks[(cx,cz)].root_tag is not None:
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
def getChunk(self, cx, cz):
|
def getChunk(self, cx, cz):
|
||||||
""" read the chunk from disk, load it, and return it.
|
""" read the chunk from disk, load it, and return it.
|
||||||
decompression and unpacking is done lazily."""
|
decompression and unpacking is done lazily."""
|
||||||
|
Reference in New Issue
Block a user