move getChunks up to MCLevel to be with the fake chunk interface

This commit is contained in:
David Vierra 2011-08-17 15:07:03 -10:00
parent 8fc517e375
commit 827ed93e24
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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"""