From 85a6959c8c731af9dc3d4ed7e4868f173314fec5 Mon Sep 17 00:00:00 2001 From: Caleb Deveraux Date: Tue, 5 Oct 2010 21:54:58 -0600 Subject: [PATCH] Don't throw in mce.py on fill/replace with an empty box mce.py, when called with an empty box (e.g., request entire world to be changed), would throw an exception, since box is None (and therefore has no volume parameter). This would prevent the ligthting steps from occuring further on. --- mce.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mce.py b/mce.py index 6deb031..7612e6d 100755 --- a/mce.py +++ b/mce.py @@ -268,7 +268,7 @@ class mce(object): self.needsSave = True; - print "Filled {0} blocks.".format(box.volume) + print "Filled {0} blocks.".format("all" if box is None else box.volume) def _replace(self, command): """ @@ -306,8 +306,8 @@ class mce(object): self.level.fillBlocks(box, newBlockType, blockData = 0, blocksToReplace = [blockType]) self.needsSave = True; - print "Replaced {0} blocks.".format(box.volume) - + print "Replaced {0} blocks.".format("all" if box is None else box.volume) + def _analyze(self, command): """ analyze