class
Rosegold::Clientbound::JoinGame
- Rosegold::Clientbound::JoinGame
- Rosegold::Clientbound::Packet
- Rosegold::Packet
- Rosegold::Event
- Reference
- Object
Included Modules
Defined in:
rosegold/packets/clientbound/join_game.crConstant Summary
-
PROTOCOL_PACKET_IDS =
{772_u32 => 43_u8}
-
Store the protocol mappings as a constant
Constructors
Class Method Summary
- .[](protocol_version : UInt32) : UInt8
-
.default_packet_id : UInt8
Define default packet ID (typically the latest/most common version)
-
.packet_id : UInt8
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) : UInt8
Get packet ID for specific protocol version
- .read(io)
-
.supported_protocols : Array(UInt32)
Helper method to get all supported protocols
-
.supports_protocol?(protocol_version : UInt32) : Bool
Helper method to check if a protocol is supported
Instance Method Summary
- #callback(client)
- #death_dimension_name : String | Nil
- #death_dimension_name=(death_dimension_name : String | Nil)
- #death_location : Rosegold::Vec3i | Nil
- #death_location=(death_location : Rosegold::Vec3i | Nil)
- #dimension_name : String
- #dimension_name=(dimension_name : String)
- #dimension_names : Array(String)
- #dimension_names=(dimension_names : Array(String))
- #dimension_type : UInt32
- #dimension_type=(dimension_type : UInt32)
- #do_limited_crafting=(do_limited_crafting : Bool)
- #do_limited_crafting? : Bool
- #enable_respawn_screen=(enable_respawn_screen : Bool)
- #enable_respawn_screen? : Bool
- #enforces_secure_chat=(enforces_secure_chat : Bool)
- #enforces_secure_chat? : Bool
- #entity_id : Int32
- #entity_id=(entity_id : Int32)
- #gamemode : UInt8
- #gamemode=(gamemode : UInt8)
- #hardcore=(hardcore : Bool)
- #hardcore? : Bool
- #has_death_location=(has_death_location : Bool)
- #has_death_location? : Bool
- #hashed_seed : Int64
- #hashed_seed=(hashed_seed : Int64)
- #is_debug=(is_debug : Bool)
- #is_debug? : Bool
- #is_flat=(is_flat : Bool)
- #is_flat? : Bool
- #max_players : UInt32
- #max_players=(max_players : UInt32)
- #portal_cooldown : UInt32
- #portal_cooldown=(portal_cooldown : UInt32)
- #previous_gamemode : Int8
- #previous_gamemode=(previous_gamemode : Int8)
- #reduced_debug_info=(reduced_debug_info : Bool)
- #reduced_debug_info? : Bool
- #sea_level : UInt32
- #sea_level=(sea_level : UInt32)
- #simulation_distance : UInt32
- #simulation_distance=(simulation_distance : UInt32)
- #view_distance : UInt32
- #view_distance=(view_distance : UInt32)
- #write : Bytes
Macros inherited from module Rosegold::Packets::ProtocolMapping
packet_ids(mappings)
packet_ids
Class methods inherited from class Rosegold::Clientbound::Packet
new_raw(bytes)
new_raw,
state
state
Instance methods inherited from class Rosegold::Packet
callback(client_or_server)
callback,
to_s(io)
to_s,
write : Bytes
write
Constructor Detail
def self.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)
#
Class Method Detail
def self.[](protocol_version : UInt32) : UInt8
#
def self.default_packet_id : UInt8
#
Define default packet ID (typically the latest/most common version)
def self.packet_id : UInt8
#
Provide backward compatibility with existing packet_id class getter Use the first protocol's packet ID for registration compatibility
def self.packet_id_for_protocol(protocol_version : UInt32) : UInt8
#
Get packet ID for specific protocol version
def self.supports_protocol?(protocol_version : UInt32) : Bool
#
Helper method to check if a protocol is supported