class

Rosegold::Clientbound::SynchronizePlayerPosition

Inherits Rosegold::Packets::ProtocolMapping / Rosegold::Clientbound::Packet / Rosegold::Packet / Rosegold::Event / Reference / Object

relative_flags: x/y/z/yaw/pitch. If a flag is set, its value is relative to the current player position/look.

Constants

PROTOCOL_PACKET_IDS = {772_u32 => 65_u32, 774_u32 => 70_u32, 775_u32 => 72_u32}

Store the protocol mappings as a constant

Constructors

new(x_raw : Float64, y_raw : Float64, z_raw : Float64, yaw_raw : Float32, pitch_raw : Float32, relative_flags : Int32, teleport_id : UInt32, velocity_x : Float64 = 0.0, velocity_y : Float64 = 0.0, velocity_z : Float64 = 0.0)
Source

Class methods

[](protocol_version : UInt32) : UInt32

Generate the method for elegant access

Source
default_packet_id

Define default packet ID (typically the latest/most common version)

Source
packet_id

Provide backward compatibility with existing packet_id class getter Use the first protocol's packet ID for registration compatibility

packet_id_for_protocol(protocol_version : UInt32) : UInt32

Get packet ID for specific protocol version (returns UInt32 for VarInt encoding in write methods)

Source
read(packet)
Source
supported_protocols

Helper method to get all supported protocols

Source
supports_protocol?(protocol_version : UInt32) : Bool

Helper method to check if a protocol is supported

Source

Instance methods

callback(client)
Source
feet(previous_feet : Vec3d) : Vec3d
Source
look(previous_look : Look) : Look
Source
pitch_raw
Source
pitch_raw=(pitch_raw : Float32)
Source
relative_flags
Source
relative_flags=(relative_flags : Int32)
Source
teleport_id
Source
teleport_id=(teleport_id : UInt32)
Source
velocity(previous_velocity : Vec3d) : Vec3d
Source
velocity_x

MC 1.21.6+ additional velocity fields

Source
velocity_x=(velocity_x : Float64)

MC 1.21.6+ additional velocity fields

Source
velocity_y

MC 1.21.6+ additional velocity fields

Source
velocity_y=(velocity_y : Float64)

MC 1.21.6+ additional velocity fields

Source
velocity_z

MC 1.21.6+ additional velocity fields

Source
velocity_z=(velocity_z : Float64)

MC 1.21.6+ additional velocity fields

Source
write
Source
x_raw
Source
x_raw=(x_raw : Float64)
Source
y_raw
Source
y_raw=(y_raw : Float64)
Source
yaw_raw
Source
yaw_raw=(yaw_raw : Float32)
Source
z_raw
Source
z_raw=(z_raw : Float64)
Source