> For the complete documentation index, see [llms.txt](https://thepython10110.gitbook.io/better-commands/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thepython10110.gitbook.io/better-commands/commands/setblock.md).

# /setblock

Places a node (aliases: /setnode)

## Syntax

`setblock <pos> <node> [keep|replace]`

## Arguments

`<pos>` [Position](/better-commands/data-types.md#position)

Specifies the position of the block to be changed.

`<node>` [Node](/better-commands/data-types.md#item-node)

Specifies the new node.

`[keep|replace]` [String](/better-commands/data-types.md#string)

Specifies how to handle the node change. Must be one of:

* `keep` - Only air blocks are changed (non-air blocks are unchanged).
* `replace` - The node is set no matter what.

If not specified, defaults to `replace`.

Nodes are set with `minetest.set_node`, meaning that they do not activate the same callbacks as they would if placed by a player.

## History

| Version | Action                           |
| ------- | -------------------------------- |
| v1.0    | Added `/setblock` and `/setnode` |
