apparently xmin,zmin,xmax,zmax is more intuitive than xmin,zmin,xmax,zmax for some people
This commit is contained in:
@@ -336,19 +336,18 @@ values. The valid configuration keys are listed below.
|
|||||||
|
|
||||||
``crop``
|
``crop``
|
||||||
You can use this to render a small subset of your map, instead of the entire
|
You can use this to render a small subset of your map, instead of the entire
|
||||||
thing. The format is (min x, max x, min z, max z).
|
thing. The format is (min x, min z, max x, max z).
|
||||||
|
|
||||||
(The coordinates are block coordinates. The same you get with the debug menu
|
(The coordinates are block coordinates. The same you get with the debug menu
|
||||||
in-game)
|
in-game)
|
||||||
|
|
||||||
Example that only renders a 1000 by 1000 square of land around the origin::
|
Example that only renders a 1000 by 1000 square of land about the origin::
|
||||||
|
|
||||||
renders['myrender'] = {
|
renders['myrender'] = {
|
||||||
'world': 'myworld',
|
'world': 'myworld',
|
||||||
'title': "Cropped Example",
|
'title': "Cropped Example",
|
||||||
'crop': (-500,500, -500,500),
|
'crop': (-500, -500, 500, 500),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.. _customrendermodes:
|
.. _customrendermodes:
|
||||||
|
|
||||||
|
|||||||
@@ -170,9 +170,9 @@ def validateCrop(value):
|
|||||||
if len(value) != 4:
|
if len(value) != 4:
|
||||||
raise ValidationException("The value for the 'crop' setting must be a tuple of length 4")
|
raise ValidationException("The value for the 'crop' setting must be a tuple of length 4")
|
||||||
value = tuple(int(x) for x in value)
|
value = tuple(int(x) for x in value)
|
||||||
if value[0] >= value[1]:
|
if value[0] >= value[2]:
|
||||||
raise ValidationException("About your crop numbers, the xmax value must be greater than the xmin value")
|
raise ValidationException("About your crop numbers, the xmax value must be greater than the xmin value")
|
||||||
if value[2] >= value[3]:
|
if value[1] >= value[3]:
|
||||||
raise ValidationException("About your crop numbers, the zmax value must be greater than the zmin value")
|
raise ValidationException("About your crop numbers, the zmax value must be greater than the zmin value")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ class RotatedRegionSet(RegionSetWrapper):
|
|||||||
yield x,z,mtime
|
yield x,z,mtime
|
||||||
|
|
||||||
class CroppedRegionSet(RegionSetWrapper):
|
class CroppedRegionSet(RegionSetWrapper):
|
||||||
def __init__(self, rsetobj, xmin, xmax, zmin, zmax):
|
def __init__(self, rsetobj, xmin, zmin, xmax, zmax):
|
||||||
super(CroppedRegionSet, self).__init__(rsetobj)
|
super(CroppedRegionSet, self).__init__(rsetobj)
|
||||||
self.xmin = xmin//16
|
self.xmin = xmin//16
|
||||||
self.xmax = xmax//16
|
self.xmax = xmax//16
|
||||||
|
|||||||
Reference in New Issue
Block a user