0

specifying a directory name for a dimension should work now

This commit is contained in:
Aaron Griffith
2013-01-06 00:43:52 -05:00
parent a49a05a2ee
commit 77fff9fa25
2 changed files with 42 additions and 35 deletions

View File

@@ -182,8 +182,20 @@ def validateStr(s):
return str(s)
def validateDimension(d):
if d in ["nether", "overworld", "end", "default"]:
return d
# these are provided as arguments to RegionSet.get_type()
pretty_names = {
"nether": "DIM-1",
"overworld": None,
"end": "DIM1",
"default": 0,
}
try:
return pretty_names[d]
except KeyError:
if d.startswith("DIM"):
return d
raise ValidationException("%r is not a valid dimension" % d)
def validateOutputDir(d):