From f15cd1992d44853b850ad58ac033bda42280c602 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Wed, 1 Dec 2010 22:40:48 -1000 Subject: [PATCH] add chunkIsLoaded test to MCInfdevOldLevel --- mclevel.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mclevel.py b/mclevel.py index 5a5d332..22c2de3 100644 --- a/mclevel.py +++ b/mclevel.py @@ -2292,6 +2292,13 @@ class MCInfdevOldLevel(MCLevel): self._loadedChunks[cx,cz] = InfdevChunk(self, (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): """ read the chunk from disk, load it, and return it.