From 04507f599d161e621d2b5c8d60c97fe4e875faa5 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Wed, 9 Mar 2011 21:04:43 -1000 Subject: [PATCH] the blocksToReplace parameter to fillBlocks defaults to an empty list now --- mclevel.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mclevel.py b/mclevel.py index 24997e1..e9b8bdf 100644 --- a/mclevel.py +++ b/mclevel.py @@ -671,7 +671,7 @@ class MCLevel(object): return blocktable - def fillBlocks(self, box, blockInfo, blocksToReplace = None): + def fillBlocks(self, box, blockInfo, blocksToReplace = []): if box is None: box = self.bounds @@ -683,7 +683,7 @@ class MCLevel(object): slices = map(slice, box.origin, box.maximum) blocks = self.Blocks[slices[0],slices[2],slices[1]] - if blocksToReplace != None: + if len(blocksToReplace): blocktable = self.blockReplaceTable(blocksToReplace) if hasattr(self, "Data"): @@ -3516,7 +3516,7 @@ class MCInfdevOldLevel(MCLevel): changesLighting = True - if blocksToReplace != None: + if len(blocksToReplace): blocktable = self.blockReplaceTable(blocksToReplace) newAbsorption = self.materials.lightAbsorption[blockInfo.ID] @@ -3546,7 +3546,7 @@ class MCInfdevOldLevel(MCLevel): needsLighting = changesLighting; - if blocksToReplace != None: + if len(blocksToReplace): mask = blocktable[blocks,data] blockCount = mask.sum() @@ -3569,7 +3569,7 @@ class MCInfdevOldLevel(MCLevel): chunk.chunkChanged(needsLighting); chunk.compress(); - if blocksToReplace != None: + if len(blocksToReplace): info( u"Replace: Skipped {0} chunks, replaced {1} blocks".format(skipped, replaced) )