File tree Expand file tree Collapse file tree
pumpkin-protocol/src/java/client/play Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ pub struct CRespawn {
1515}
1616
1717impl CRespawn {
18+ pub const KEEP_ATTRIBUTE_MODIFIERS : u8 = 1 ;
19+ pub const KEEP_ENTITY_DATA : u8 = 2 ;
20+ pub const KEEP_ALL_DATA : u8 = 3 ;
21+
1822 #[ must_use]
1923 pub const fn new ( player_spawn_info : PlayerSpawnData , data_kept : u8 ) -> Self {
2024 Self {
Original file line number Diff line number Diff line change @@ -2510,14 +2510,14 @@ impl Player {
25102510 new_world. dimension. clone( ) ,
25112511 biome:: hash_seed( new_world. level. seed. 0 ) , // seed
25122512 self . gamemode. load( ) as u8 ,
2513- self . gamemode. load( ) as i8 ,
2513+ self . previous_gamemode . load ( ) . unwrap_or ( self . gamemode. load( ) ) as i8 ,
25142514 false ,
25152515 false ,
25162516 Some ( ( death_dimension, death_location) ) ,
25172517 VarInt ( self . get_entity( ) . portal_cooldown. load( Ordering :: Relaxed ) as i32 ) ,
25182518 new_world. sea_level. into( ) ,
25192519 ) ,
2520- 1 ,
2520+ CRespawn :: KEEP_ALL_DATA ,
25212521 ) ) . await ;
25222522
25232523 self . send_permission_lvl_update( ) ;
You can’t perform that action at this time.
0 commit comments