class

Rosegold::Clientbound::Login

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

Login (play) packet - clientbound/minecraft:login (0x2B) Sent by server after configuration phase to join the game

Constants

PROTOCOL_PACKET_IDS = {772_u32 => 43_u32, 774_u32 => 48_u32, 775_u32 => 49_u32}

Store the protocol mappings as a constant

Constructors

new(entity_id : Int32, hardcore : Bool, dimension_names : Array(String), max_players : UInt32, view_distance : UInt32, simulation_distance : UInt32, reduced_debug_info : Bool, enable_respawn_screen : Bool, do_limited_crafting : Bool, dimension_type : UInt32, dimension_name : String, hashed_seed : Int64, gamemode : UInt8, previous_gamemode : Int8, is_debug : Bool, is_flat : Bool, has_death_location : Bool, death_dimension_name : Nil | String, death_location : Rosegold::Vec3i | Nil, portal_cooldown : UInt32, sea_level : UInt32, enforces_secure_chat : Bool)
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(io)
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
death_dimension_name
Source
death_dimension_name=(death_dimension_name : String | Nil)
Source
death_location
Source
death_location=(death_location : Rosegold::Vec3i | Nil)
Source
dimension_name
Source
dimension_name=(dimension_name : String)
Source
dimension_names
Source
dimension_names=(dimension_names : Array(String))
Source
dimension_type
Source
dimension_type=(dimension_type : UInt32)
Source
do_limited_crafting=(do_limited_crafting : Bool)
Source
do_limited_crafting?
Source
enable_respawn_screen=(enable_respawn_screen : Bool)
Source
enable_respawn_screen?
Source
enforces_secure_chat=(enforces_secure_chat : Bool)
Source
enforces_secure_chat?
Source
entity_id
Source
entity_id=(entity_id : Int32)
Source
gamemode
Source
gamemode=(gamemode : UInt8)
Source
hardcore=(hardcore : Bool)
Source
hardcore?
Source
has_death_location=(has_death_location : Bool)
Source
has_death_location?
Source
hashed_seed
Source
hashed_seed=(hashed_seed : Int64)
Source
is_debug=(is_debug : Bool)
Source
is_debug?
Source
is_flat=(is_flat : Bool)
Source
is_flat?
Source
max_players
Source
max_players=(max_players : UInt32)
Source
portal_cooldown
Source
portal_cooldown=(portal_cooldown : UInt32)
Source
previous_gamemode
Source
previous_gamemode=(previous_gamemode : Int8)
Source
reduced_debug_info=(reduced_debug_info : Bool)
Source
reduced_debug_info?
Source
sea_level
Source
sea_level=(sea_level : UInt32)
Source
simulation_distance
Source
simulation_distance=(simulation_distance : UInt32)
Source
view_distance
Source
view_distance=(view_distance : UInt32)
Source
write
Source