SyncEntityPositionPacket
class
Declaration
[ProtocolSupport(768, 777)]
[Packet("play.toClient.sync_entity_position", PacketPhase.Play, PacketDirection.Clientbound)]
[PacketField("EntityId", "int")]
[PacketField("Yaw", "float")]
[PacketField("Pitch", "float")]
[PacketField("OnGround", "bool")]
[PacketField("X", "double", Group = "V768_776", From = 768, To = 776)]
[PacketField("Y", "double", Group = "V768_776", From = 768, To = 776)]
[PacketField("Z", "double", Group = "V768_776", From = 768, To = 776)]
[PacketField("Dx", "double", Group = "V768_776", From = 768, To = 776)]
[PacketField("Dy", "double", Group = "V768_776", From = 768, To = 776)]
[PacketField("Dz", "double", Group = "V768_776", From = 768, To = 776)]
[PacketField("Position", "SyncEntityPositionKind", Group = "V777_Last", From = 777)]
public sealed record SyncEntityPositionPacket : IPacket<SyncEntityPositionPacket>, IProtocolType<SyncEntityPositionPacket>, IPacket
| Namespace | McProtoNet.Protocol.Packets.Play.Clientbound |
| Assembly | McProtoNet.Protocol.dll |
| Source | src/McProtoNet.Protocol/Generated/Packets/Play/Clientbound/SyncEntityPositionPacket.cs#L6 ↗ |
Implements: IPacket<SyncEntityPositionPacket>, IProtocolType<SyncEntityPositionPacket>, IPacket
Constructors
SyncEntityPositionPacket(int, float, float, bool, V768_776Layer?, V777_LastLayer?)
public SyncEntityPositionPacket(int EntityId, float Yaw, float Pitch, bool OnGround, SyncEntityPositionPacket.V768_776Layer? V768_776 = null, SyncEntityPositionPacket.V777_LastLayer? V777_Last = null)
Parameters: EntityId (int), Yaw (float), Pitch (float), OnGround (bool), V768_776 (SyncEntityPositionPacket.V768_776Layer?), V777_Last (SyncEntityPositionPacket.V777_LastLayer?)
Properties
| Signature | Description |
|---|---|
int EntityId | - |
static PacketIdentity Identity | Gets the identity of the packet type. |
bool OnGround | - |
float Pitch | - |
SyncEntityPositionPacket.V768_776Layer? V768_776 | - |
SyncEntityPositionPacket.V777_LastLayer? V777_Last | - |
float Yaw | - |
EntityId
public int EntityId { get; init; }
Returns: int
Identity
public static PacketIdentity Identity { get; }
Gets the identity of the packet type.
Returns: PacketIdentity
OnGround
public bool OnGround { get; init; }
Returns: bool
Pitch
public float Pitch { get; init; }
Returns: float
V768_776
public SyncEntityPositionPacket.V768_776Layer? V768_776 { get; init; }
Returns: SyncEntityPositionPacket.V768_776Layer?
V777_Last
public SyncEntityPositionPacket.V777_LastLayer? V777_Last { get; init; }
Returns: SyncEntityPositionPacket.V777_LastLayer?
Yaw
public float Yaw { get; init; }
Returns: float
Methods
| Signature | Description |
|---|---|
static int GetPacketId(int protocolVersion) | - |
static SyncEntityPositionPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion) | Reads a value of type SyncEntityPositionPacket 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 (int)
Returns: int
Read(ref MinecraftPrimitiveReader, int)
public static SyncEntityPositionPacket Read(ref MinecraftPrimitiveReader reader, int protocolVersion)
Reads a value of type SyncEntityPositionPacket from the specified reader.
Parameters: reader (MinecraftPrimitiveReader), protocolVersion (int)
Returns: SyncEntityPositionPacket - 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 (int), id (int)
Returns: bool - true if the packet exists on the specified protocol version; otherwise, false.
Write(MinecraftPrimitiveWriter, int)
public void Write(MinecraftPrimitiveWriter writer, int protocolVersion)
Writes the current value to the specified writer.
Parameters: writer (MinecraftPrimitiveWriter), protocolVersion (int)