Updated documentation and added an additional validation check for
improperly formatted crop zones.
This commit is contained in:
@@ -709,8 +709,10 @@ values. The valid configuration keys are listed below.
|
||||
.. _crop:
|
||||
|
||||
``crop``
|
||||
You can use this to render one or more small subsets of your map, instead
|
||||
of the entire thing. The format is [(min x, min z, max x, max z)].
|
||||
You can use this to render one or more small subsets of your map. The format
|
||||
of an individual crop zone is (min x, min z, max x, max z); if you wish to
|
||||
specify multiple crop zones, you may do so by specifying a list of crop zones,
|
||||
i.e. [(min x1, min z1, max x1, max z1), (min x2, min z2, max x2, max z2)]
|
||||
|
||||
The coordinates are block coordinates. The same you get with the debug menu
|
||||
in-game and the coordinates shown when you view a map.
|
||||
|
||||
@@ -230,7 +230,7 @@ def validateCrop(value):
|
||||
|
||||
cropZones = []
|
||||
for zone in value:
|
||||
if len(zone) != 4:
|
||||
if not isinstance(zone, tuple) or len(zone) != 4:
|
||||
raise ValidationException("The value for the 'crop' setting must be an array of tuples of length 4")
|
||||
a, b, c, d = tuple(int(x) for x in zone)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user