<commit_before>= title('Regions')

%p
  = t('modules.regions.text')

:xml
  <regions>
    <point id="sign-block">51,21,50</point>

    <join id="flag-areas">
      <cuboid min="10,50,10" max="30,50,30" />
      <cuboid min="-10,50,-10" max="-30,50,-30" />
    </join>

    <cuboid id="inside-map" min="-125,0,-125 max="150, 256, 150" />

    <invert id="outside-map">
      <region id="inside-map"/>
    </invert>
  </regions>

= attribute_table('Region Attributes') do
  = attribute_row_id
  = attribute_row(true) do
    = attribute_name('...')
    = attribute_desc(t('modules.regions.attribute'))
    = attribute_column
    = attribute_column


= subtitle('Region Types')
%p
  = t('modules.regions.types')

= section(t('modules.regions.reference')) do
  %small
    = label('Bounded*', 'info')
%p
  You may use the
  :xmlcode
    <region>
  type to reference regions that are listed in the
  :xmlcode
    <regions>
  element by their id.

:xml
  <point id="a-point">24, 15, 60</point>

  <join id="reference-example">
    <region id="a-point"/>
  </join>
%small
  = t('modules.regions.bounded_note')

= section('Point') do
  %small
    = label('Bounded', 'info')
%p
  = t('modules.regions.point')
:xml
  <point>24, 15.5, 60</point>

= section('Cuboid') do
  %small
    = label('Bounded', 'info')
%p
  A cuboid is a three-dimensional box with its corners at
  %code min
  and
  %code max
  \.
:xml
  <cuboid min="23, 50, 15" max="40, 62, 31"/>
  <cuboid min="50, 30, 30" max="25, 18, 25"/> <!-- min doesn't strictly require to be below max -->

= section('Cylinder') do
  %small
    = label('Bounded', 'info')
%p
  A cylinder with its base at
  %code base
  with a radius as specified in
  %code radius
  and a height as specified in
  %code height
  \.
:xml
  <cylinder base="23, 50, 15" radius="5" height="10"/>

= section('Circle') do
  %small
    = label('Bounded', 'info')
%p
  A circle is essentially a cylinder with a height of 1. Its base is specified in
  %code center
  and has a radius as specified in
  %code radius
  \.
:xml
  <circle center="23, 50, 15" radius="5"/>

= section('Sphere') do
  %small
    = label('Bounded', 'info')
%p
  A spherical area with its origin at
  %code origin
  and with a radius specified in
  %code radius
  \.
:xml
  <sphere origin="50, 18, 30" radius="12"/>

= section('Box') do
  %small
    = label('Bounded', 'info')
%p
  A box is a helper region that will return a cuboid region based on supplied coordinate modifiers and a center.
:xml
  <box center="4,3,1" x="4" y="5" z="11"/>
  <!-- A cuboid that centers at 4,3,1 spreads out above and below the supplied coordinates. -->
  <!-- If x,y, or z isn't supplied, 0 will be used for the value -->


= subtitle('Abstract Regions')
%p
  The following regions modify the previous types in a variety of ways.

= section('Join') do
  %small
    = label('Bounded*', 'info')
%p
  Provide any number of regions within this region type to create a region that combines all
  the points of the nested regions.
:xml
  <join>
    <cuboid min="-5, 90, -5" max="5, 100, 5" />
    <sphere origin="0, 100, 0" radius="5" />
  </join>
%small
  * This region is only considered bounded or iterable if the regions within it are all of the bounded or iterable type respectively.

= section('Translate')
%p
  This translates all the regions nested within it by the amount provided in
  %code offset
  \.
:xml
  <translate offset="-25, -10, 0">
    <cuboid min="-5, 90, -5" max="5, 100, 5" />
    <sphere origin="0, 100, 0" radius="5" />
  </translate>

= section('Invert')
%p
  The invert region takes the inverse of the regions provided within the element. For example, if a single
  point is provided, the inverted version of that region would be every point in the world excluding that point.
:xml
  <invert>
    <cuboid min="32, 112, 52" max="52, 12, 5"/>
    <translate offset="-25, -10, 0">
      <cuboid min="-5, 90, -5" max="5, 100, 5" />
      <sphere origin="0, 100, 0" radius="5" />
    </translate>
  </invert>

= section('Intersect')
%p
  This region is comprised of points that are shared by all of the nested regions.
:xml
  <intersect>
    <cuboid min="0, 5, 0" max="5, 10, 5"/>
    <cuboid min="0, 5, 0" max="5, 7, 5"/>
  </intersect>

= section('Subtract')
%p
  The subtract region takes the first listed region and for each successive region listed, removes points from it.
:xml
  <subtract> <!-- these region includes all points in the cuboid, except 60, 40, 60 -->
    <cuboid min="45, 32, 45" max="90, 64, 90"/>
    <point>60, 40, 60</point>
  </subtract>

= subtitle('Other Regions')
= section('Above, Below')
%p
  Selects the area above or below and including the specified
  %code x
  ,
  %code y
  or
  %code z
  coordinates.
:xml
  <above y="25"/> <!-- everything above y=25 -->
  <above x="25" z="21"/>  <!-- any block in below x=25, z=21 -->
  <below x="32" y="18" z="52"/> <!-- you get the idea -->

= section('Void')
%p
  The void region selects all blocks that have only air at
  %code Y=5
  and below.
:xml
  <void/> <!-- everything that has void under it. -->

= section('Sector')
%p
  Represents a sector of a circle that covers all Y values.
:xml
  <sector x="11" z="22" start="120.0" end="130.0"> <!-- everything between angle 120 and 130 in a circle that has a base at the supplied coords. -->

= section('Nowhere')
%p
  Represents... well, nowhere at all.<commit_msg>Document the bounds region<commit_after>= title('Regions')

%p
  = t('modules.regions.text')

:xml
  <regions>
    <point id="sign-block">51,21,50</point>

    <join id="flag-areas">
      <cuboid min="10,50,10" max="30,50,30" />
      <cuboid min="-10,50,-10" max="-30,50,-30" />
    </join>

    <cuboid id="inside-map" min="-125,0,-125 max="150, 256, 150" />

    <invert id="outside-map">
      <region id="inside-map"/>
    </invert>
  </regions>

= attribute_table('Region Attributes') do
  = attribute_row_id
  = attribute_row(true) do
    = attribute_name('...')
    = attribute_desc(t('modules.regions.attribute'))
    = attribute_column
    = attribute_column


= subtitle('Region Types')
%p
  = t('modules.regions.types')

= section(t('modules.regions.reference')) do
  %small
    = label('Bounded*', 'info')
%p
  You may use the
  :xmlcode
    <region>
  type to reference regions that are listed in the
  :xmlcode
    <regions>
  element by their id.

:xml
  <point id="a-point">24, 15, 60</point>

  <join id="reference-example">
    <region id="a-point"/>
  </join>
%small
  = t('modules.regions.bounded_note')

= section('Point') do
  %small
    = label('Bounded', 'info')
%p
  = t('modules.regions.point')
:xml
  <point>24, 15.5, 60</point>

= section('Cuboid') do
  %small
    = label('Bounded', 'info')
%p
  A cuboid is a three-dimensional box with its corners at
  %code min
  and
  %code max
  \.
:xml
  <cuboid min="23, 50, 15" max="40, 62, 31"/>
  <cuboid min="50, 30, 30" max="25, 18, 25"/> <!-- min doesn't strictly require to be below max -->

= section('Cylinder') do
  %small
    = label('Bounded', 'info')
%p
  A cylinder with its base at
  %code base
  with a radius as specified in
  %code radius
  and a height as specified in
  %code height
  \.
:xml
  <cylinder base="23, 50, 15" radius="5" height="10"/>

= section('Circle') do
  %small
    = label('Bounded', 'info')
%p
  A circle is essentially a cylinder with a height of 1. Its base is specified in
  %code center
  and has a radius as specified in
  %code radius
  \.
:xml
  <circle center="23, 50, 15" radius="5"/>

= section('Sphere') do
  %small
    = label('Bounded', 'info')
%p
  A spherical area with its origin at
  %code origin
  and with a radius specified in
  %code radius
  \.
:xml
  <sphere origin="50, 18, 30" radius="12"/>

= section('Box') do
  %small
    = label('Bounded', 'info')
%p
  A box is a helper region that will return a cuboid region based on supplied coordinate modifiers and a center.
:xml
  <box center="4,3,1" x="4" y="5" z="11"/>
  <!-- A cuboid that centers at 4,3,1 spreads out above and below the supplied coordinates. -->
  <!-- If x,y, or z isn't supplied, 0 will be used for the value -->


= subtitle('Abstract Regions')
%p
  The following regions modify the previous types in a variety of ways.

= section('Join') do
  %small
    = label('Bounded*', 'info')
%p
  Provide any number of regions within this region type to create a region that combines all
  the points of the nested regions.
:xml
  <join>
    <cuboid min="-5, 90, -5" max="5, 100, 5" />
    <sphere origin="0, 100, 0" radius="5" />
  </join>
%small
  * This region is only considered bounded or iterable if the regions within it are all of the bounded or iterable type respectively.

= section('Translate')
%p
  This translates all the regions nested within it by the amount provided in
  %code offset
  \.
:xml
  <translate offset="-25, -10, 0">
    <cuboid min="-5, 90, -5" max="5, 100, 5" />
    <sphere origin="0, 100, 0" radius="5" />
  </translate>

= section('Invert')
%p
  The invert region takes the inverse of the regions provided within the element. For example, if a single
  point is provided, the inverted version of that region would be every point in the world excluding that point.
:xml
  <invert>
    <cuboid min="32, 112, 52" max="52, 12, 5"/>
    <translate offset="-25, -10, 0">
      <cuboid min="-5, 90, -5" max="5, 100, 5" />
      <sphere origin="0, 100, 0" radius="5" />
    </translate>
  </invert>

= section('Intersect')
%p
  This region is comprised of points that are shared by all of the nested regions.
:xml
  <intersect>
    <cuboid min="0, 5, 0" max="5, 10, 5"/>
    <cuboid min="0, 5, 0" max="5, 7, 5"/>
  </intersect>

= section('Subtract')
%p
  The subtract region takes the first listed region and for each successive region listed, removes points from it.
:xml
  <subtract> <!-- these region includes all points in the cuboid, except 60, 40, 60 -->
    <cuboid min="45, 32, 45" max="90, 64, 90"/>
    <point>60, 40, 60</point>
  </subtract>

= subtitle('Other Regions')
= section('Above, Below')
%p
  Selects the area above or below and including the specified
  %code x
  ,
  %code y
  or
  %code z
  coordinates.
:xml
  <above y="25"/> <!-- everything above y=25 -->
  <above x="25" z="21"/>  <!-- any block in below x=25, z=21 -->
  <below x="32" y="18" z="52"/> <!-- you get the idea -->

= section('Bounds')
%p
  Selects the area around the region specified. Similar to the WorldEdit //walls command.
  %code x-axis
  ,
  %code y-axis
  or
  %code z-axis
  which are
  %code true
  by default. If
  %code false
  , the blocks on that axis will not be selected.
:xml
  <bounds id="bound" y-axis="false">
    <region>
      <cuboid min="11, 10, -13" max="2, 10, -5"/>
    </region>
  </bounds>

= section('Void')
%p
  The void region selects all blocks that have only air at
  %code Y=5
  and below.
:xml
  <void/> <!-- everything that has void under it. -->

= section('Sector')
%p
  Represents a sector of a circle that covers all Y values.
:xml
  <sector x="11" z="22" start="120.0" end="130.0"> <!-- everything between angle 120 and 130 in a circle that has a base at the supplied coords. -->

= section('Nowhere')
%p
  Represents... well, nowhere at all.
{'fraction_non_alphanumeric': 0.15521560207550544, 'fraction_numerical': 0.04741456432277688, 'mean_word_length': 3.207376740684983, 'pattern_counts': {'":': 0, '<': 138, '<?xml version=': 0, '>': 138, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 37}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5886476', 'n_tokens_mistral': 4280, 'n_tokens_neox': 3828, 'n_words': 1408}