> 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/api/net/minecraft/network/client/c07packetplayerdigging.md).

# C07PacketPlayerDigging

Packet sent when breaking blocks or dropping items

### Example

```ts
const packet = new C07PacketPlayerDigging('START_DESTROY_BLOCK', blockPos, 'UP');
```

### Extends

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

### Constructors

#### Constructor

> **new C07PacketPlayerDigging**(`action`, `block`, `face`): `C07PacketPlayerDigging`

Create a new C07PacketPlayerDigging packet

**Parameters**

**action**

[`DiggingAction`](/api/enum_types/diggingaction.md)

The dig action (START\_DESTROY\_BLOCK, ABORT\_DESTROY\_BLOCK, STOP\_DESTROY\_BLOCK, DROP\_ALL\_ITEMS, DROP\_ITEM, RELEASE\_USE\_ITEM)

**block**

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

The block position

**face**

[`EnumFacing`](/api/enum_types/enumfacing.md)

The block face (DOWN, UP, NORTH, SOUTH, WEST, EAST)

**Returns**

`C07PacketPlayerDigging`

**Overrides**

`Packet.constructor`

### Methods

#### getAction()

> **getAction**(): [`DiggingAction`](/api/enum_types/diggingaction.md)

Get the dig action

**Returns**

[`DiggingAction`](/api/enum_types/diggingaction.md)

The dig action name

***

#### getFace()

> **getFace**(): [`EnumFacing`](/api/enum_types/enumfacing.md)

Get the block face

**Returns**

[`EnumFacing`](/api/enum_types/enumfacing.md)

The block face name

***

#### getPacketID()

> **getPacketID**(): `string`

Get the ID of the packet.

**Returns**

`string`

The ID of the packet.

**Inherited from**

[`Packet`](/api/net/minecraft/network/packet.md).[`getPacketID`](/api/net/minecraft/network/packet.md#getpacketid)

***

#### getPosition()

> **getPosition**(): [`BlockPos`](/api/net/minecraft/util/blockpos.md)

Get the block position

**Returns**

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

The block position

***

#### setAction()

> **setAction**(`action`): `void`

Set the dig action

**Parameters**

**action**

[`DiggingAction`](/api/enum_types/diggingaction.md)

The dig action name

**Returns**

`void`

***

#### setFace()

> **setFace**(`face`): `void`

Set the block face

**Parameters**

**face**

[`EnumFacing`](/api/enum_types/enumfacing.md)

The block face name

**Returns**

`void`

***

#### setPosition()

> **setPosition**(`pos`): `void`

Set the block position

**Parameters**

**pos**

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

The new block position

**Returns**

`void`
