Rosegold::Serverbound::InteractEntity
Inherits Rosegold::Packets::ProtocolMapping / Rosegold::Serverbound::Packet / Rosegold::Packet / Rosegold::Event / Reference / Object
Constants
PROTOCOL_PACKET_IDS = {772_u32 => 25_u32, 774_u32 => 25_u32, 775_u32 => 26_u32}
Store the protocol mappings as a constant
Constructors
new(entity_id : UInt64, action : Action, target_x : Float32 | Nil = nil, target_y : Float32 | Nil = nil, target_z : Float32 | Nil = nil, hand : Hand | Nil = nil, sneaking : Bool = false)
SourceClass methods
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)
supports_protocol?(protocol_version : UInt32) : Bool
Helper method to check if a protocol is supported
Instance methods
action
Sourceaction=(action : Action)
Sourceentity_id
Sourceentity_id=(entity_id : UInt64)
Sourcehand
Sourcehand=(hand : Hand | Nil)
Sourcesneaking=(sneaking : Bool)
Sourcesneaking?
Sourcetarget_x
Sourcetarget_x=(target_x : Float32 | Nil)
Sourcetarget_y
Sourcetarget_y=(target_y : Float32 | Nil)
Sourcetarget_z
Sourcetarget_z=(target_z : Float32 | Nil)
Sourcewrite
Source