change getChunks to return an iterator
This commit is contained in:
parent
aca3bf88e7
commit
72dc4374dd
@ -1516,11 +1516,11 @@ class MCInfdevOldLevel(MCLevel):
|
||||
|
||||
|
||||
def getChunks(self, chunks=None):
|
||||
""" pass a list of chunk coordinate tuples to get a list of InfdevChunks.
|
||||
pass nothing for a list of every chunk in the level.
|
||||
""" 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)]
|
||||
return (self.getChunk(cx, cz) for (cx, cz) in chunks if self.containsChunk(cx, cz))
|
||||
|
||||
|
||||
def _makeChunk(self, cx, cz):
|
||||
|
Reference in New Issue
Block a user