From c313d25ecdb184ab4b1c46803f734df71b29b090 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Mon, 14 Nov 2011 10:18:09 -1000 Subject: [PATCH] add default name for dimensions --- infiniteworld.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infiniteworld.py b/infiniteworld.py index 9230c0c..f2e84fe 100644 --- a/infiniteworld.py +++ b/infiniteworld.py @@ -2958,7 +2958,8 @@ class MCAlphaDimension (MCInfdevOldLevel): dimensionNames = { -1: "Nether", 1: "The End"}; @property def displayName(self): - return u"{0} ({1})".format(self.parentWorld.displayName, self.dimensionNames[self.dimNo]) + return u"{0} ({1})".format(self.parentWorld.displayName, + self.dimensionNames.get(self.dimNo, "Dimension %d" % self.dimNo)) def saveInPlace(self, saveSelf=False): """saving the dimension will save the parent world, which will save any