# C07PacketPlayerDigging

Packet sent when breaking blocks or dropping items

### Example

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

### Extends

* [`Packet`](https://scripting.breeze.rip/api/net/minecraft/network/packet)

### Constructors

#### Constructor

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

Create a new C07PacketPlayerDigging packet

**Parameters**

**action**

[`DiggingAction`](https://scripting.breeze.rip/api/enum_types/diggingaction)

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

**block**

[`BlockPos`](https://scripting.breeze.rip/api/net/minecraft/util/blockpos)

The block position

**face**

[`EnumFacing`](https://scripting.breeze.rip/api/enum_types/enumfacing)

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

**Returns**

`C07PacketPlayerDigging`

**Overrides**

`Packet.constructor`

### Methods

#### getAction()

> **getAction**(): [`DiggingAction`](https://scripting.breeze.rip/api/enum_types/diggingaction)

Get the dig action

**Returns**

[`DiggingAction`](https://scripting.breeze.rip/api/enum_types/diggingaction)

The dig action name

***

#### getFace()

> **getFace**(): [`EnumFacing`](https://scripting.breeze.rip/api/enum_types/enumfacing)

Get the block face

**Returns**

[`EnumFacing`](https://scripting.breeze.rip/api/enum_types/enumfacing)

The block face name

***

#### getPacketID()

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

Get the ID of the packet.

**Returns**

`string`

The ID of the packet.

**Inherited from**

[`Packet`](https://scripting.breeze.rip/api/net/minecraft/network/packet).[`getPacketID`](https://scripting.breeze.rip/api/net/minecraft/packet#getpacketid)

***

#### getPosition()

> **getPosition**(): [`BlockPos`](https://scripting.breeze.rip/api/net/minecraft/util/blockpos)

Get the block position

**Returns**

[`BlockPos`](https://scripting.breeze.rip/api/net/minecraft/util/blockpos)

The block position

***

#### setAction()

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

Set the dig action

**Parameters**

**action**

[`DiggingAction`](https://scripting.breeze.rip/api/enum_types/diggingaction)

The dig action name

**Returns**

`void`

***

#### setFace()

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

Set the block face

**Parameters**

**face**

[`EnumFacing`](https://scripting.breeze.rip/api/enum_types/enumfacing)

The block face name

**Returns**

`void`

***

#### setPosition()

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

Set the block position

**Parameters**

**pos**

[`BlockPos`](https://scripting.breeze.rip/api/net/minecraft/util/blockpos)

The new block position

**Returns**

`void`
