fix: respawn packet data

This commit is contained in:
Alexander Medvedev committed 2026-06-24 21:12:27 +02:00
1 parent 2c0e981a85
commit 9055a6133e
2 files changed
+6 -2

No files matched your search

@@ -15,6 +15,10 @@ pub struct CRespawn {
} }
impl CRespawn { impl CRespawn {
pub const KEEP_ATTRIBUTE_MODIFIERS: u8 = 1;
pub const KEEP_ENTITY_DATA: u8 = 2;
pub const KEEP_ALL_DATA: u8 = 3;
#[must_use] #[must_use]
pub const fn new(player_spawn_info: PlayerSpawnData, data_kept: u8) -> Self { pub const fn new(player_spawn_info: PlayerSpawnData, data_kept: u8) -> Self {
Self { Self {
+2 -2
View File
@@ -2510,14 +2510,14 @@ impl Player {
new_world.dimension.clone(), new_world.dimension.clone(),
biome::hash_seed(new_world.level.seed.0), // seed biome::hash_seed(new_world.level.seed.0), // seed
self.gamemode.load() as u8, self.gamemode.load() as u8,
self.gamemode.load() as i8, self.previous_gamemode.load().unwrap_or(self.gamemode.load()) as i8,
false, false,
false, false,
Some((death_dimension, death_location)), Some((death_dimension, death_location)),
VarInt(self.get_entity().portal_cooldown.load(Ordering::Relaxed) as i32), VarInt(self.get_entity().portal_cooldown.load(Ordering::Relaxed) as i32),
new_world.sea_level.into(), new_world.sea_level.into(),
), ),
1, CRespawn::KEEP_ALL_DATA,
)).await; )).await;
self.send_permission_lvl_update(); self.send_permission_lvl_update();