C05PacketPlayerLook

A packet sent by the client to update the player's rotation

Example

var packet = new C05PacketPlayerLook(180, 90, true); // Create a packet for looking straight down

Extends

Constructors

Constructor

new C05PacketPlayerLook(yaw, pitch, onGround): C05PacketPlayerLook

Creates a new C05PacketPlayerLook with rotation values

Parameters

yaw

number

yaw - The yaw rotation (-180 to 180)

pitch

number

pitch - The pitch rotation (-90 to 90)

onGround

boolean

onGround - Whether the player is on ground

Returns

C05PacketPlayerLook

Overrides

C03PacketPlayer.constructor

Methods

getPacketID()

getPacketID(): string

Get the ID of the packet.

Returns

string

The ID of the packet.

Inherited from

C03PacketPlayer.getPacketID


getPitch()

getPitch(): number

Gets the pitch rotation

Returns

number

The pitch rotation

Inherited from

C03PacketPlayer.getPitch


getPositionX()

getPositionX(): number

Gets the X position

Returns

number

The X position

Inherited from

C03PacketPlayer.getPositionX


getPositionY()

getPositionY(): number

Gets the Y position

Returns

number

The Y position

Inherited from

C03PacketPlayer.getPositionY


getPositionZ()

getPositionZ(): number

Gets the Z position

Returns

number

The Z position

Inherited from

C03PacketPlayer.getPositionZ


getRotating()

getRotating(): boolean

Checks if the player is rotating

Returns

boolean

True if the player is rotating

Inherited from

C03PacketPlayer.getRotating


getYaw()

getYaw(): number

Gets the yaw rotation

Returns

number

The yaw rotation

Inherited from

C03PacketPlayer.getYaw


isMoving()

isMoving(): boolean

Checks if the player is moving

Returns

boolean

True if the player is moving

Inherited from

C03PacketPlayer.isMoving


isOnGround()

isOnGround(): boolean

Checks if the player is on ground

Returns

boolean

True if the player is on ground

Inherited from

C03PacketPlayer.isOnGround


setOnGround()

setOnGround(onGround): void

Sets if the player is on ground

Parameters

onGround

boolean

onGround - True to set the player on ground

Returns

void

Inherited from

C03PacketPlayer.setOnGround


setPosition()

setPosition(x, y, z): void

Sets the player position

Parameters

x

number

x - The X position

y

number

y - The Y position

z

number

z - The Z position

Returns

void

Inherited from

C03PacketPlayer.setPosition


setRotations()

setRotations(yaw, pitch): void

Sets the player rotation

Parameters

yaw

number

yaw - The yaw rotation

pitch

number

pitch - The pitch rotation

Returns

void

Inherited from

C03PacketPlayer.setRotations

Last updated