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)
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)
read(io)
Sourcesupports_protocol?(protocol_version : UInt32) : Bool
Helper method to check if a protocol is supported
Instance methods
callback(client)
Sourcedeath_dimension_name
Sourcedeath_dimension_name=(death_dimension_name : String | Nil)
Sourcedeath_location
Sourcedimension_name
Sourcedimension_name=(dimension_name : String)
Sourcedimension_names
Sourcedimension_names=(dimension_names : Array(String))
Sourcedimension_type
Sourcedimension_type=(dimension_type : UInt32)
Sourcedo_limited_crafting=(do_limited_crafting : Bool)
Sourcedo_limited_crafting?
Sourceenable_respawn_screen=(enable_respawn_screen : Bool)
Sourceenable_respawn_screen?
Sourceenforces_secure_chat=(enforces_secure_chat : Bool)
Sourceenforces_secure_chat?
Sourceentity_id
Sourcegamemode
Sourcegamemode=(gamemode : UInt8)
Sourcehardcore=(hardcore : Bool)
Sourcehardcore?
Sourcehas_death_location=(has_death_location : Bool)
Sourcehas_death_location?
Sourcehashed_seed
Sourcehashed_seed=(hashed_seed : Int64)
Sourceis_debug=(is_debug : Bool)
Sourceis_debug?
Sourceis_flat=(is_flat : Bool)
Sourceis_flat?
Sourcemax_players
Sourcemax_players=(max_players : UInt32)
Sourceportal_cooldown
Sourceportal_cooldown=(portal_cooldown : UInt32)
Sourceprevious_gamemode
Sourceprevious_gamemode=(previous_gamemode : Int8)
Sourcereduced_debug_info=(reduced_debug_info : Bool)
Sourcereduced_debug_info?
Sourcesea_level
Sourcesea_level=(sea_level : UInt32)
Sourcesimulation_distance
Sourcesimulation_distance=(simulation_distance : UInt32)
Sourceview_distance
Sourceview_distance=(view_distance : UInt32)
Sourcewrite
Source