Skip to content

Document hand, offhand, and pos1 patterns#73

Open
madebyisaacr wants to merge 2 commits into
EngineHub:masterfrom
madebyisaacr:document-hand-pattern
Open

Document hand, offhand, and pos1 patterns#73
madebyisaacr wants to merge 2 commits into
EngineHub:masterfrom
madebyisaacr:document-hand-pattern

Conversation

@madebyisaacr

Copy link
Copy Markdown

This pull requests adds documentation for the hand, offhand, and pos1 patterns.

Closes #72

image

Comment thread source/usage/general/patterns.rst Outdated

//set ##*slabs

Hand and Offhand Patterns

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These aren't separate patterns, but are part of "Single Block Pattern", so they should go under that section. We can probably just call them "hand"/"offhand" without the "pattern" after.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I updated it to move the hand, offhand, and pos1 values under the "single block" section and added a link to the Selecting Cuboids docs.

Comment thread source/usage/general/patterns.rst Outdated

//set offhand

Pos1 Pattern

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto for this one.

Comment thread source/usage/general/patterns.rst Outdated
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we link to the "Selecting Cuboids" section here?

@octylFractal octylFractal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one extra thing that could be added. We also need to fix the docs build so I can double-check what this looks like, but we'll do that separately.


The most basic pattern of just a single block. A block is identified by three parts: the `block type <https://minecraft.wiki/w/Java_Edition_data_values#IDs>`_, additional `block states <https://minecraft.wiki/w/Block_states>`_, and `nbt data <https://minecraft.wiki/w/NBT_format>`_. 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably also worth mentioning that setting states and NBT still works with this.

@octylFractal

Copy link
Copy Markdown
Member

We also need to fix the docs build so I can double-check what this looks like, but we'll do that separately.

This is done now, if you don't mind rebasing when you add the extra thing I mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document hand/offhand/pos1 block pattern aliases

2 participants