From 4e452452e7709f8c8f1b8d1eb0a5b61ca29c2f76 Mon Sep 17 00:00:00 2001 From: Isaac Roberts <119639439+madebyisaacr@users.noreply.github.com> Date: Wed, 1 Jul 2026 17:33:22 -0400 Subject: [PATCH 1/2] Document hand, offhand, and pos1 patterns --- source/usage/general/patterns.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/source/usage/general/patterns.rst b/source/usage/general/patterns.rst index 3ed83a8..16bd882 100644 --- a/source/usage/general/patterns.rst +++ b/source/usage/general/patterns.rst @@ -138,6 +138,36 @@ The syntax for this pattern is ``##``, which will randomly choose betw //set ##*slabs +Hand and Offhand Patterns +------------------------- + +The ``hand`` and ``offhand`` patterns use the block held in your main hand or offhand respectively. This is useful when you already have the block you want to use in your hotbar. The block type and states are taken from the item you are holding, where applicable. + +.. topic:: Example: Hand and offhand patterns + + Setting a selection to the block in your main hand:: + + //set hand + + Setting a selection to the block in your offhand:: + + //set offhand + +Pos1 Pattern +------------ + +The ``pos1`` pattern uses the block at your primary selection point (set with ``//pos1`` or the selection wand). This lets you use a block already in the world as your pattern without having to look up its name or states. + +.. topic:: Example: Pos1 pattern + + Setting a selection to the block at pos1:: + + //set pos1 + + Replacing stone with the block at pos1:: + + //replace stone pos1 + Special Block Data Syntax ~~~~~~~~~~~~~~~~~~~~~~~~~ From f7cfd9701b69299ed2e764f00c7a6edeab7c96ad Mon Sep 17 00:00:00 2001 From: Isaac Roberts <119639439+madebyisaacr@users.noreply.github.com> Date: Wed, 1 Jul 2026 18:24:30 -0400 Subject: [PATCH 2/2] Address feedback --- source/usage/general/patterns.rst | 46 +++++++++++-------------------- 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/source/usage/general/patterns.rst b/source/usage/general/patterns.rst index 16bd882..b182058 100644 --- a/source/usage/general/patterns.rst +++ b/source/usage/general/patterns.rst @@ -20,6 +20,10 @@ Single Block Pattern The most basic pattern of just a single block. A block is identified by three parts: the `block type `_, additional `block states `_, and `nbt data `_. These three links to the Minecraft Wiki, along with WorldEdit's in-built tab-completion for commands, should guide you in specifying the block you want. Additional states are always appended to the type using the syntax ``block_type[state1=value,state2=value,...]``. Note that when states are not specified, or if some are left out, the default values will be used for those states. NBT is written using Minecraft's SNBT syntax, ``block_type{'nbt_key':'value'}``. NBT data always comes after the block states if supplied, ``block_type[property=value]{'nbt_key':'value'}``. +Instead of specifying a block type directly, you can use ``hand`` or ``offhand`` to use the block held in your main hand or offhand respectively. This is useful when you already have the block you want to use in your hotbar. The block type and states are taken from the item you are holding, where applicable. + +You can also use ``pos1`` to use the block at your primary selection point. See :ref:`Selecting Cuboids ` for how to set your selection. + .. topic:: Example: Single block patterns Setting a selection to stone:: @@ -42,6 +46,18 @@ The most basic pattern of just a single block. A block is identified by three pa //set oak_sign[rotation=12]{'is_waxed':1} + Setting a selection to the block in your main hand:: + + //set hand + + Setting a selection to the block in your offhand:: + + //set offhand + + Setting a selection to the block at pos1:: + + //set pos1 + Random Pattern -------------- @@ -138,36 +154,6 @@ The syntax for this pattern is ``##``, which will randomly choose betw //set ##*slabs -Hand and Offhand Patterns -------------------------- - -The ``hand`` and ``offhand`` patterns use the block held in your main hand or offhand respectively. This is useful when you already have the block you want to use in your hotbar. The block type and states are taken from the item you are holding, where applicable. - -.. topic:: Example: Hand and offhand patterns - - Setting a selection to the block in your main hand:: - - //set hand - - Setting a selection to the block in your offhand:: - - //set offhand - -Pos1 Pattern ------------- - -The ``pos1`` pattern uses the block at your primary selection point (set with ``//pos1`` or the selection wand). This lets you use a block already in the world as your pattern without having to look up its name or states. - -.. topic:: Example: Pos1 pattern - - Setting a selection to the block at pos1:: - - //set pos1 - - Replacing stone with the block at pos1:: - - //replace stone pos1 - Special Block Data Syntax ~~~~~~~~~~~~~~~~~~~~~~~~~