# C0CPacketInput

Packet sent by the client to update player movement input

### Example

```ts
var packet = new C0CPacketInput(0, 1, true, false); // Create a packet for moving forward and jumping
```

### Extends

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

### Constructors

#### Constructor

> **new C0CPacketInput**(`strafe`, `forward`, `jumping`, `sneaking`): `C0CPacketInput`

Creates a new C0CPacketInput with the specified movement values

**Parameters**

**strafe**

`number`

The strafe speed (-1.0 to 1.0)

**forward**

`number`

The forward speed (-1.0 to 1.0)

**jumping**

`boolean`

Whether the player is jumping

**sneaking**

`boolean`

Whether the player is sneaking

**Returns**

`C0CPacketInput`

**Overrides**

`Packet.constructor`

### Methods

#### getForward()

> **getForward**(): `number`

Gets the forward speed

**Returns**

`number`

The forward speed (-1.0 to 1.0)

***

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

***

#### getStrafe()

> **getStrafe**(): `number`

Gets the strafe speed

**Returns**

`number`

The strafe speed (-1.0 to 1.0)

***

#### isJumping()

> **isJumping**(): `boolean`

Checks if jumping is enabled

**Returns**

`boolean`

True if the player is jumping

***

#### isSneaking()

> **isSneaking**(): `boolean`

Checks if sneaking is enabled

**Returns**

`boolean`

True if the player is sneaking

***

#### setForward()

> **setForward**(`forward`): `void`

Sets the forward speed

**Parameters**

**forward**

`number`

The new forward speed (-1.0 to 1.0)

**Returns**

`void`

***

#### setJumping()

> **setJumping**(`jumping`): `void`

Sets the jumping state

**Parameters**

**jumping**

`boolean`

Whether jumping should be enabled

**Returns**

`void`

***

#### setSneaking()

> **setSneaking**(`sneaking`): `void`

Sets the sneaking state

**Parameters**

**sneaking**

`boolean`

Whether sneaking should be enabled

**Returns**

`void`

***

#### setStrafe()

> **setStrafe**(`strafe`): `void`

Sets the strafe speed

**Parameters**

**strafe**

`number`

The new strafe speed (-1.0 to 1.0)

**Returns**

`void`
