From 827ed93e240f96e578f64adaca09b8ce99cb3687 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Wed, 17 Aug 2011 15:07:03 -1000 Subject: [PATCH] move getChunks up to MCLevel to be with the fake chunk interface --- infiniteworld.py | 7 ------- level.py | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) 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"""