diff --git a/infiniteworld.py b/infiniteworld.py index 040a6a2..60fb35a 100644 --- a/infiniteworld.py +++ b/infiniteworld.py @@ -1495,13 +1495,6 @@ class MCInfdevOldLevel(EntityLevel): return self._allChunks.__iter__(); - def getChunks(self, chunks=None): - """ pass a list of chunk coordinate tuples to get an iterator yielding - InfdevChunks. pass nothing for an iterator of every chunk in the level. - the chunks are automatically loaded.""" - if chunks is None: chunks = self.allChunks; - return (self.getChunk(cx, cz) for (cx, cz) in chunks if self.containsChunk(cx, cz)) - def _makeChunk(self, cx, cz): """return the InfdevChunk object at the given position. because loading diff --git a/level.py b/level.py index 8ab7c2d..11ed11d 100644 --- a/level.py +++ b/level.py @@ -130,6 +130,13 @@ class MCLevel(object): return self.loadedChunks + def getChunks(self, chunks=None): + """ pass a list of chunk coordinate tuples to get an iterator yielding + InfdevChunks. pass nothing for an iterator of every chunk in the level. + the chunks are automatically loaded.""" + if chunks is None: chunks = self.allChunks; + return (self.getChunk(cx, cz) for (cx, cz) in chunks if self.containsChunk(cx, cz)) + def _getFakeChunkEntities(self, cx, cz): """Returns Entities, TileEntities"""