Skip to main content

PlayerPositionPacket

class

Declaration

[ProtocolSupport(735, 776)]
[Packet("play.toClient.position", PacketPhase.Play, PacketDirection.Clientbound)]
[PacketField("X", "double")]
[PacketField("Y", "double")]
[PacketField("Z", "double")]
[PacketField("Yaw", "float")]
[PacketField("Pitch", "float")]
[PacketField("Flags", "PositionUpdateRelatives")]
[PacketField("TeleportId", "int")]
[PacketField("DismountVehicle", "bool", Group = "V755_761", From = 755, To = 761)]
[PacketField("Dx", "double", Group = "V768_Last", From = 768)]
[PacketField("Dy", "double", Group = "V768_Last", From = 768)]
[PacketField("Dz", "double", Group = "V768_Last", From = 768)]
public sealed record PlayerPositionPacket : IPacket<PlayerPositionPacket>, IProtocolType<PlayerPositionPacket>, IPacket
NamespaceMcProtoNet.Protocol.Packets.Play.Clientbound
AssemblyMcProtoNet.Protocol.dll
Sourcesrc/McProtoNet.Protocol/Generated/Packets/Play/Clientbound/PlayerPositionPacket.cs#L5 ↗

Implements: IPacket<PlayerPositionPacket>, IProtocolType<PlayerPositionPacket>, IPacket

Constructors

SignatureDescription
PlayerPositionPacket(double X, double Y, double Z, float Yaw, float Pitch, PositionUpdateRelatives Flags, int TeleportId, PlayerPositionPacket.V755_761Layer? V755_761 = null, PlayerPositionPacket.V768_LastLayer? V768_Last = null)-

PlayerPositionPacket(double, double, double, float, float, PositionUpdateRelatives, int, V755_761Layer?, V768_LastLayer?)

public PlayerPositionPacket(double X, double Y, double Z, float Yaw, float Pitch, PositionUpdateRelatives Flags, int TeleportId, PlayerPositionPacket.V755_761Layer? V755_761 = null, PlayerPositionPacket.V768_LastLayer? V768_Last = null)

Parameters: X (Double), Y (Double), Z (Double), Yaw (Single), Pitch (Single), Flags (PositionUpdateRelatives), TeleportId (Int32), V755_761 (Nullable<V755_761Layer>), V768_Last (Nullable<V768_LastLayer>)

Properties

SignatureDescription
PositionUpdateRelatives Flags-
static PacketIdentity IdentityGets the identity of the packet type.
float Pitch-
int TeleportId-
PlayerPositionPacket.V755_761Layer? V755_761-
PlayerPositionPacket.V768_LastLayer? V768_Last-
double X-
double Y-
float Yaw-
double Z-

Flags

public PositionUpdateRelatives Flags { get; init; }

Returns: PositionUpdateRelatives

Identity

public static PacketIdentity Identity { get; }

Gets the identity of the packet type.

Returns: PacketIdentity

Pitch

public float Pitch { get; init; }

Returns: Single

TeleportId

public int TeleportId { get; init; }

Returns: Int32

V755_761

public PlayerPositionPacket.V755_761Layer? V755_761 { get; init; }

Returns: Nullable<V755_761Layer>

V768_Last

public PlayerPositionPacket.V768_LastLayer? V768_Last { get; init; }

Returns: Nullable<V768_LastLayer>

X

public double X { get; init; }

Returns: Double

Y

public double Y { get; init; }

Returns: Double

Yaw

public float Yaw { get; init; }

Returns: Single

Z

public double Z { get; init; }

Returns: Double

Methods

SignatureDescription
static int GetPacketId(int protocolVersion)-
static PlayerPositionPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)Reads a value of type PlayerPositionPacket from the specified reader.
static bool TryGetPacketId(int protocolVersion, out int id)Attempts to get the wire id of the packet for the specified protocol version.
void Write(MinecraftPrimitiveWriter writer, int protocolVersion)Writes the current value to the specified writer.

GetPacketId(int)

public static int GetPacketId(int protocolVersion)

Parameters: protocolVersion (Int32)

Returns: Int32

Read(ref MinecraftPrimitiveReader, int)

public static PlayerPositionPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)

Reads a value of type PlayerPositionPacket from the specified reader.

Parameters: reader (MinecraftPrimitiveReader), protocolVersion (Int32)

Returns: PlayerPositionPacket - The value that was read.

TryGetPacketId(int, out int)

public static bool TryGetPacketId(int protocolVersion, out int id)

Attempts to get the wire id of the packet for the specified protocol version.

Parameters: protocolVersion (Int32), id (Int32)

Returns: Boolean - <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool"&gt;true&lt;/a> if the packet exists on the specified protocol version; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool"&gt;false&lt;/a>.

Write(MinecraftPrimitiveWriter, int)

public void Write(MinecraftPrimitiveWriter writer, int protocolVersion)

Writes the current value to the specified writer.

Parameters: writer (MinecraftPrimitiveWriter), protocolVersion (Int32)