class

Rosegold::Clientbound::Respawn

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

Constants

PROTOCOL_PACKET_IDS = {772_u32 => 75_u32, 774_u32 => 80_u32, 775_u32 => 82_u32}

Store the protocol mappings as a constant

Constructors

new(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, data_kept : UInt8)
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(packet)
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
data_kept
Source
data_kept=(data_kept : UInt8)
Source
death_dimension_name
Source
death_dimension_name=(death_dimension_name : String | Nil)
Source
death_location
Source
death_location=(death_location : Vec3i | Nil)
Source
dimension_name
Source
dimension_name=(dimension_name : String)
Source
dimension_type
Source
dimension_type=(dimension_type : UInt32)
Source
gamemode
Source
gamemode=(gamemode : UInt8)
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
portal_cooldown
Source
portal_cooldown=(portal_cooldown : UInt32)
Source
previous_gamemode
Source
previous_gamemode=(previous_gamemode : Int8)
Source
sea_level
Source
sea_level=(sea_level : UInt32)
Source
write
Source