move getChunks up to MCLevel to be with the fake chunk interface
This commit is contained in:
parent
8fc517e375
commit
827ed93e24
@ -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
|
||||
|
7
level.py
7
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"""
|
||||
|
Reference in New Issue
Block a user