Перейти к основному содержимому

PositionLookPacket

class

Declaration

[ProtocolSupport(735, 776)]
[Packet("play.toServer.position_look", PacketPhase.Play, PacketDirection.Serverbound)]
[PacketField("X", "double")]
[PacketField("Y", "double")]
[PacketField("Z", "double")]
[PacketField("Yaw", "float")]
[PacketField("Pitch", "float")]
[PacketField("OnGround", "bool", Group = "VUntil767", To = 767)]
[PacketField("Flags", "MovementFlags", Group = "V768_Last", From = 768)]
public sealed record PositionLookPacket : IPacket<PositionLookPacket>, IProtocolType<PositionLookPacket>, IPacket
NamespaceMcProtoNet.Protocol.Packets.Play.Serverbound
AssemblyMcProtoNet.Protocol.dll
Sourcesrc/McProtoNet.Protocol/Generated/Packets/Play/Serverbound/PositionLookPacket.cs#L5 ↗

Implements: IPacket<PositionLookPacket>, IProtocolType<PositionLookPacket>, IPacket

Constructors

SignatureDescription
PositionLookPacket(double X, double Y, double Z, float Yaw, float Pitch, PositionLookPacket.VUntil767Layer? VUntil767 = null, PositionLookPacket.V768_LastLayer? V768_Last = null)-

PositionLookPacket(double, double, double, float, float, VUntil767Layer?, V768_LastLayer?)

public PositionLookPacket(double X, double Y, double Z, float Yaw, float Pitch, PositionLookPacket.VUntil767Layer? VUntil767 = null, PositionLookPacket.V768_LastLayer? V768_Last = null)

Parameters: X (Double), Y (Double), Z (Double), Yaw (Single), Pitch (Single), VUntil767 (Nullable<VUntil767Layer>), V768_Last (Nullable<V768_LastLayer>)

Properties

SignatureDescription
static PacketIdentity IdentityGets the identity of the packet type.
float Pitch-
PositionLookPacket.V768_LastLayer? V768_Last-
PositionLookPacket.VUntil767Layer? VUntil767-
double X-
double Y-
float Yaw-
double Z-

Identity

public static PacketIdentity Identity { get; }

Gets the identity of the packet type.

Returns: PacketIdentity

Pitch

public float Pitch { get; init; }

Returns: Single

V768_Last

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

Returns: Nullable<V768_LastLayer>

VUntil767

public PositionLookPacket.VUntil767Layer? VUntil767 { get; init; }

Returns: Nullable<VUntil767Layer>

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 PositionLookPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)Reads a value of type PositionLookPacket 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 PositionLookPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)

Reads a value of type PositionLookPacket from the specified reader.

Parameters: reader (MinecraftPrimitiveReader), protocolVersion (Int32)

Returns: PositionLookPacket - 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)