# C08PacketBlockPlacement

Represents a packet sent when a player places a block

### Extends

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

### Constructors

#### Constructor

> **new C08PacketBlockPlacement**(`position`, `placedBlockDirection`, `stack`, `vec3`): `C08PacketBlockPlacement`

Creates a new block placement packet

**Parameters**

**position**

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

The position where the block is being placed

**placedBlockDirection**

`number`

The direction the block is being placed

**stack**

[`ItemStack`](https://scripting.breeze.rip/api/net/minecraft/item/itemstack)

The ItemStack being placed

**vec3**

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

The hit vector position

**Returns**

`C08PacketBlockPlacement`

**Overrides**

`Packet.constructor`

### Methods

#### 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)

***

#### getPlacedBlockDirection()

> **getPlacedBlockDirection**(): `number`

Gets the direction the block is being placed

**Returns**

`number`

The block direction as an integer

***

#### getPosition()

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

Gets the position where the block is being placed

**Returns**

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

The BlockPos position

***

#### getStack()

> **getStack**(): [`ItemStack`](https://scripting.breeze.rip/api/net/minecraft/item/itemstack)

Gets the ItemStack being placed

**Returns**

[`ItemStack`](https://scripting.breeze.rip/api/net/minecraft/item/itemstack)

The ItemStack

***

#### getVec3()

> **getVec3**(): [`Vec3`](https://scripting.breeze.rip/api/net/minecraft/util/vec3)

Gets the hit vector position

**Returns**

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

The Vec3 position

***

#### setPlacedBlockDirection()

> **setPlacedBlockDirection**(`placedBlockDirection`): `void`

Sets the direction the block is being placed

**Parameters**

**placedBlockDirection**

`number`

The new block direction

**Returns**

`void`

***

#### setPosition()

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

Sets the position where the block is being placed

**Parameters**

**position**

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

The new BlockPos position

**Returns**

`void`

***

#### setStack()

> **setStack**(`stack`): `void`

Sets the ItemStack being placed

**Parameters**

**stack**

[`ItemStack`](https://scripting.breeze.rip/api/net/minecraft/item/itemstack)

The new ItemStack

**Returns**

`void`

***

#### setVec3()

> **setVec3**(`vec3`): `void`

Sets the hit vector position

**Parameters**

**vec3**

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

The new Vec3 position

**Returns**

`void`
