> For the complete documentation index, see [llms.txt](https://docs.onelitefeather.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onelitefeather.net/for-builders/paint-only-on-one-block-with-a-mask.md).

# Paint only on one block with a mask

Limit every stroke to one block type, so that a stroke over stone changes stone and nothing else.

![Brush menu with the mask turned off: the Mask item shows a carved pumpkin and the Current Mask item is dirt](https://862810040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3dAk0UjgUbQUOWgnpUwe%2Fuploads%2Fgit-blob-a8a83e597b68fd2ad8ef7c23836780a983ddd9b5%2Fmenu-spray-disabled.svg?alt=media)

## What you need

* The brush item and the `bettergopaint.use` permission.
* A solid block of the type you want to paint on, in your inventory.

The defaults start with the mask **on** and sponge as the mask block. A new builder who right-clicks grass with the defaults changes nothing, until the mask is set to grass or turned off.

## Steps

1. Left-click the brush item to open the brush menu.
2. Pick up the block from your inventory and left-click the **Current Mask** item (slot 52). The item changes to that block.
3. Click the **Mask** item (slot 15). Its lore changes to **Enabled** and it becomes a jack o'lantern.
4. Close the menu and right-click the area you want to paint.

Click the **Mask** item again to turn the mask off. Its lore then says **Disabled**.

{% hint style="info" %}
Planned screenshot: `images/screenshots/mask-only-stone.png`, see the shotlist.
{% endhint %}

## How the mask decides

* A stroke changes a block only if the block has exactly the mask type. Stone does not match andesite, polished stone or cobblestone.
* The mask applies to every brush.

## Mask or `//gmask`

`//gmask` is a WorldEdit mask on your session. It applies to every WorldEdit command and to brush strokes. The brush mask is set in the brush menu, applies only to brush strokes and accepts one block type. A stroke changes a block only when both masks accept it.

## Related

* [Brush menu](/reference/brush-menu.md) gives the slot of each menu item.
* [How a brush stroke is applied](/background/how-a-brush-stroke-is-applied.md) describes the two masks in order.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.onelitefeather.net/for-builders/paint-only-on-one-block-with-a-mask.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
