Rosegold::Serverbound::ClickWindow
Inherits Rosegold::Packets::ProtocolMapping / Rosegold::Serverbound::Packet / Rosegold::Packet / Rosegold::Event / Reference / Object
Constants
PROTOCOL_PACKET_IDS = {772_u32 => 17_u32, 774_u32 => 17_u32, 775_u32 => 18_u32}
Store the protocol mappings as a constant
Constructors
new(mode : Rosegold::Serverbound::ClickWindow::Mode, button : Int8, slot_number : Int16, changed_slots : Array(Rosegold::WindowSlot), window_id : UInt8, state_id : Int32, cursor : Rosegold::Slot)
SourceClass methods
click(window, slot_number, right = false, shift = false, double = false)
Sourcedrop(window, slot_number, stack_mode : StackMode)
Sourcedrop_cursor(window, stack_mode : StackMode)
Sourcepacket_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
swap_off_hand(window, slot_number)
SourceInstance methods
button
Sourcebutton=(button : Int8)
Sourcechanged_slots
Sourcechanged_slots=(changed_slots : Array(WindowSlot))
Sourcecursor
Sourcecursor=(cursor : Slot)
Sourcemode
Sourcemode=(mode : Mode)
Sourceslot_number
Sourceslot_number=(slot_number : Int16)
Sourcestate_id
Sourcewindow_id
Sourcewindow_id=(window_id : UInt8)
Sourcewrite
Source