0

world: ignore poi directory in world dir

This is a new directory added in 1.14 which contains .mca files too.

Since we scan for directories with .mca files to use as RegionSets,
and we don't know how to handle these, just skip them.

Fixes some warnings during rendering.
This commit is contained in:
Nicolas F
2019-04-23 11:29:35 +02:00
parent bc322fa3e4
commit 8760b040c6

View File

@@ -134,11 +134,12 @@ class World(object):
if mcas: if mcas:
# construct a regionset object for this # construct a regionset object for this
rel = os.path.relpath(root, self.worlddir) rel = os.path.relpath(root, self.worlddir)
rset = RegionSet(root, rel) if rel != "poi":
if root == os.path.join(self.worlddir, "region"): rset = RegionSet(root, rel)
self.regionsets.insert(0, rset) if root == os.path.join(self.worlddir, "region"):
else: self.regionsets.insert(0, rset)
self.regionsets.append(rset) else:
self.regionsets.append(rset)
# TODO move a lot of the following code into the RegionSet # TODO move a lot of the following code into the RegionSet
@@ -272,7 +273,7 @@ class RegionSet(object):
# this is the main world # this is the main world
self.type = None self.type = None
else: else:
logging.warning("Unkown region type in %r", regiondir) logging.warning("Unknown region type in %r", regiondir)
self.type = "__unknown" self.type = "__unknown"
logging.debug("Scanning regions. Type is %r" % self.type) logging.debug("Scanning regions. Type is %r" % self.type)