> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/api/net/minecraft/network/protocol/game/serverboundsetcommandblockpacket.md).

# ServerboundSetCommandBlockPacket

Edits a command block.

### Extends

* [`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md)

### Constructors

#### Constructor

> **new ServerboundSetCommandBlockPacket**(`pos`, `command`, `mode`, `trackOutput`, `conditional`, `automatic`): `ServerboundSetCommandBlockPacket`

A command block edit.

**Parameters**

**pos**

[`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The block.

**command**

`string`

The command.

**mode**

[`CommandBlockMode`](/newgen/api/enum_types/commandblockmode.md)

The mode.

**trackOutput**

`boolean`

Store output.

**conditional**

`boolean`

Conditional.

**automatic**

`boolean`

Always active.

**Returns**

`ServerboundSetCommandBlockPacket`

**Overrides**

`Packet.constructor`

### Properties

#### automatic

> `readonly` **automatic**: `boolean`

Whether it is always active.

***

#### command

> `readonly` **command**: `string`

The command.

***

#### conditional

> `readonly` **conditional**: `boolean`

Whether it only runs when the block behind it succeeded.

***

#### id

> `readonly` **id**: `string`

The protocol id, e.g. "minecraft:swing". Stable across versions, unlike class names.

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`id`](/newgen/api/net/minecraft/network/protocol/packet.md#id)

***

#### mode

> `readonly` **mode**: [`CommandBlockMode`](/newgen/api/enum_types/commandblockmode.md)

The block mode.

***

#### name

> `readonly` **name**: `string`

The class name, e.g. "ServerboundSwingPacket".

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`name`](/newgen/api/net/minecraft/network/protocol/packet.md#name)

***

#### pos

> `readonly` **pos**: [`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The command block.

***

#### serverbound

> `readonly` **serverbound**: `boolean`

True for packets the client sends, false for ones it receives.

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`serverbound`](/newgen/api/net/minecraft/network/protocol/packet.md#serverbound)

***

#### trackOutput

> `readonly` **trackOutput**: `boolean`

Whether the last output is stored.
