Skip to content

Commit

Permalink
Clarify flags for //gen, add //genbiome and //setbiome.
Browse files Browse the repository at this point in the history
  • Loading branch information
wizjany committed Jan 7, 2020
1 parent 74fffde commit 2f14768
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
20 changes: 15 additions & 5 deletions source/usage/generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ This uses the :doc:`expression parser <other/expressions>`.
Flags
------

* ``-r`` - Use raw coordinates, as they appear on the debug screen (F3)
* ``-o`` - Use raw coordinate offsets with (0,0,0) at your placement position
* with neither of these flags, coordinates will be normalized to -1..1
* ``-r`` - Use raw coordinates, with one block equaling one unit
* ``-c`` - Shift the origin to the center of your selection, with one block equaling one unit
* ``-o`` - Shift the origin to your placement position (your position or pos1, with ``/togglepos``), with one block equaling one unit
* Without any of these flags, coordinates will be normalized to -1..1 (from selection min/max points, meaning the entire selection is 2x2x2 units), note that each axis may be a different number of blocks per unit depending on your selection skewness.

* ``-h`` - Generate a hollow shape. Blocks will only be set if they neighbour any blocks that are not part of the shape.

Variables
Expand All @@ -121,7 +123,7 @@ Variables
* ``x``, ``y``, ``z`` (input) - Coordinates
* ``type``, ``data`` (input/output) - Material to use, defaults to the block/pattern entered

.. note:: Since the expression parser only takes numbers as variables, it only works with blocks that have legacy type/data values. If you need to use it with newer blocks (> MC 1.13), use a placeholder and ``//replace`` that placeholder after generating your shape.
.. note:: Since the expression parser only takes numbers as variables, type/data variables and query functions only work with blocks that have legacy type/data values. If you need to use it with newer blocks (> MC 1.13), use a placeholder and ``//replace`` that placeholder after generating your shape. The ``<pattern>`` arg of the command is not restricted, only the expression.

The expression should return true (``> 0``) for blocks that are part of the shape and false (``<= 0``) for blocks not part of the shape. The expression is tested for each block in your selection.

Expand Down Expand Up @@ -163,4 +165,12 @@ Shape Examples
//g stone -(z^2/12)+(y^2/4)-(x^2/12)>-0.03


.. tip:: Want more cool shapes? Try out a program like `MathMod <https://github.com/parisolab/mathmod/releases>`_ which comes with tons of shapes and helps you make more. Note that WorldEdit uses isometric (x,y,z) formulas, not parametric (u,v,t). Also, you may have to scale your x, y, and z variable depending on your selection size and the domain of the function.
.. tip:: Want more cool shapes? Try out a program like `MathMod <https://github.com/parisolab/mathmod/releases>`_ which comes with tons of shapes and helps you make more. Note that WorldEdit uses isometric (x,y,z) formulas, not parametric (u,v,t). Also, you may have to scale your x, y, and z variable depending on your selection size and the domain of the function.


Generating Biome Shapes
~~~~~~~~~~~~~~~~~~~~~~~

Just like the generate command, you can use an expression to set a biome in a particular shape. This uses the same syntax as above, but takes a biome id instead of a pattern. It currently only uses ``x`` and ``z`` as inputs.

.. note:: As of Minecraft 1.15, biomes are stored in 3 dimensions. However, neither Minecraft nor WorldEdit can fully use this format yet, so biomes are still just treated as full columns.
7 changes: 6 additions & 1 deletion source/usage/regions/regionops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ The ``//regen`` command will regenerate your selection to its state when the wor

.. warning:: The regen command will use the current world generator, which means if the world was generated via an external tool, or if Minecraft's terrain generation has changed in the meantime, the regenerated area will not match everything around it. If possible, consider taking a backup of your entire world ahead of time for use with :doc:`snapshots <../snapshots>`.

.. note:: The Bukkit API that WorldEdit uses for this command is non-fuctional as of Minecraft 1.14, so this command will not work. This does not affect other platforms.

Naturalizing
------------
Expand Down Expand Up @@ -183,3 +182,9 @@ By default, coordinates are normalized from -1 to 1 on each axis, from the min t
Flipping your selection on its side::

//deform swap(x,y)


Setting Biomes
--------------

While WorldEdit mostly focuses on manipulating blocks, the ``//setbiome <biome>`` command allows you to set the biome in your selection. The biome type should be specifed by `biome id <https://minecraft.gamepedia.com/Biome#Biome_IDs>`_. If you are using a biome added by a mod, the ``namespace:`` must prefix the id, e.g. ``minecraft:plains``.

0 comments on commit 2f14768

Please sign in to comment.