> 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/serverboundmoveplayerpacket.md).

# ServerboundMovePlayerPacket

The movement packet sent every tick. Fields it doesn't carry (hasPosition / hasRotation false) read as 0.

### Extends

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

### Constructors

#### Constructor

> **new ServerboundMovePlayerPacket**(`onGround`, `horizontalCollision`): `ServerboundMovePlayerPacket`

A packet with neither position nor rotation.

**Parameters**

**onGround**

`boolean`

On ground.

**horizontalCollision**

`boolean`

Touching a wall.

**Returns**

`ServerboundMovePlayerPacket`

**Overrides**

`Packet.constructor`

#### Constructor

> **new ServerboundMovePlayerPacket**(`yRot`, `xRot`, `onGround`, `horizontalCollision`): `ServerboundMovePlayerPacket`

A rotation-only packet.

**Parameters**

**yRot**

`number`

Yaw.

**xRot**

`number`

Pitch.

**onGround**

`boolean`

On ground.

**horizontalCollision**

`boolean`

Touching a wall.

**Returns**

`ServerboundMovePlayerPacket`

**Overrides**

`Packet.constructor`

#### Constructor

> **new ServerboundMovePlayerPacket**(`x`, `y`, `z`, `onGround`, `horizontalCollision`): `ServerboundMovePlayerPacket`

A position-only packet.

**Parameters**

**x**

`number`

X.

**y**

`number`

Y.

**z**

`number`

Z.

**onGround**

`boolean`

On ground.

**horizontalCollision**

`boolean`

Touching a wall.

**Returns**

`ServerboundMovePlayerPacket`

**Overrides**

`Packet.constructor`

#### Constructor

> **new ServerboundMovePlayerPacket**(`x`, `y`, `z`, `yRot`, `xRot`, `onGround`, `horizontalCollision`): `ServerboundMovePlayerPacket`

A packet with position and rotation.

**Parameters**

**x**

`number`

X.

**y**

`number`

Y.

**z**

`number`

Z.

**yRot**

`number`

Yaw.

**xRot**

`number`

Pitch.

**onGround**

`boolean`

On ground.

**horizontalCollision**

`boolean`

Touching a wall.

**Returns**

`ServerboundMovePlayerPacket`

**Overrides**

`Packet.constructor`

### Properties

#### hasPosition

> `readonly` **hasPosition**: `boolean`

Whether this packet carries a position.

***

#### hasRotation

> `readonly` **hasRotation**: `boolean`

Whether this packet carries a rotation.

***

#### horizontalCollision

> **horizontalCollision**: `boolean`

Whether the player claims to touch a wall.

***

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

***

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

***

#### onGround

> **onGround**: `boolean`

Whether the player claims to stand on a 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)

***

#### x

> **x**: `number`

The X position.

***

#### xRot

> **xRot**: `number`

The pitch.

***

#### y

> **y**: `number`

The Y position.

***

#### yRot

> **yRot**: `number`

The yaw.

***

#### z

> **z**: `number`

The Z position.
