pub struct CRespawn {Show 13 fields
pub dimension_type: i32,
pub dimension_name: Identifier,
pub hashed_seed: i64,
pub gamemode: u8,
pub previous_gamemode: i8,
pub is_debug: bool,
pub is_flat: bool,
pub has_death_location: bool,
pub death_dimension_name: Option<Identifier>,
pub death_location: Option<BlockPos>,
pub portal_cooldown_ticks: i32,
pub sea_level: i32,
pub data_kept: i8,
}Expand description
Respawn a player in any dimension.
Sent by the server when a player respawns after death or changes dimensions. The client will reset its world state and prepare for new chunk data.
Fields§
§dimension_type: i32The dimension type registry ID.
dimension_name: IdentifierThe dimension name (e.g. minecraft:overworld).
hashed_seed: i64The hashed seed of the world (used for biome noise).
gamemode: u8The player’s game mode after respawning.
previous_gamemode: i8The player’s previous game mode (-1 if none).
is_debug: boolWhether this is a debug world.
is_flat: boolWhether this is a superflat world.
has_death_location: boolWhether the player has a death location.
death_dimension_name: Option<Identifier>The dimension name of the death location (if has_death_location is true).
death_location: Option<BlockPos>The block position of the death location (if has_death_location is true).
portal_cooldown_ticks: i32The portal cooldown in ticks.
sea_level: i32The sea level of the dimension.
data_kept: i8Bit field: 0x01 = keep attributes, 0x02 = keep metadata. Set to 0 for a full reset (normal respawn).
Trait Implementations§
Source§impl ClientPacket for CRespawn
impl ClientPacket for CRespawn
Source§fn get_id(&self, protocol: ConnectionProtocol) -> Option<i32>
fn get_id(&self, protocol: ConnectionProtocol) -> Option<i32>
Source§fn write_packet(
&self,
writer: &mut impl Write,
protocol: ConnectionProtocol,
) -> Result<(), PacketError>
fn write_packet( &self, writer: &mut impl Write, protocol: ConnectionProtocol, ) -> Result<(), PacketError>
Auto Trait Implementations§
impl Freeze for CRespawn
impl RefUnwindSafe for CRespawn
impl Send for CRespawn
impl Sync for CRespawn
impl Unpin for CRespawn
impl UnsafeUnpin for CRespawn
impl UnwindSafe for CRespawn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreArc<SyncMutex<>>