world: add __lt__ to RegionSetWrapper for genPOI
genPOI needs this for groupby, and since we can now throw cropped regionsets into genPOI we definitely need this too. Probably also fixes rotated regionsets with multiple genPOI filters.
This commit is contained in:
@@ -1469,6 +1469,15 @@ class RegionSetWrapper(object):
|
||||
def __init__(self, rsetobj):
|
||||
self._r = rsetobj
|
||||
|
||||
def __lt__(self, other):
|
||||
"""This garbage is only needed because genPOI wants to use
|
||||
itertools.groupby, which needs sorted keys, and Python 2 somehow
|
||||
just sorted objects like ???????? how????? why?????
|
||||
"""
|
||||
if isinstance(other, RegionSetWrapper):
|
||||
other = other._r
|
||||
return self._r.regiondir < other.regiondir
|
||||
|
||||
def get_type(self):
|
||||
return self._r.get_type()
|
||||
def get_biome_data(self, x, z):
|
||||
|
||||
Reference in New Issue
Block a user