diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 0998eb553..aeeddd58d 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -4147,7 +4147,7 @@ impl Game<'_> { [player.velocity.x, player.velocity.y, player.velocity.z], [player.position.x, player.position.y, player.position.z], ); - if !riding && !self.pause { + if !riding { MotionWorld { entities: &entity_collisions, player, @@ -4413,7 +4413,7 @@ impl Game<'_> { self.resolve_arrivals(); }); } - horizon_client::spans::time("tick_lan", || self.tick_lan()); + horizon_client::spans::time("tick_lan", || self.tick_lan(false)); self.tick_friends(); horizon_client::spans::time("tick_hand", || self.tick_hand()); horizon_client::spans::time("tick_sleep", || self.tick_sleep()); diff --git a/crates/horizon-client/src/game/lan.rs b/crates/horizon-client/src/game/lan.rs index 8bf72abee..8460f54e6 100644 --- a/crates/horizon-client/src/game/lan.rs +++ b/crates/horizon-client/src/game/lan.rs @@ -834,8 +834,11 @@ impl Game<'_> { self.lan_object_states(host_entity, hub, out); } - /// Run the hub for this tick and apply what the guests did. - pub(super) fn tick_lan(&mut self) { + /// Run the hub for this tick and apply what the guests did. While the + /// single player game is `paused` only the connections run + /// (`IntegratedServer.tickPaused`): `ServerGamePacketListenerImpl.tick` + /// skips `tickPlayer`, so no player's air, hunger or damage moves on. + pub(super) fn tick_lan(&mut self, paused: bool) { let Some(mut host) = self.lan.take() else { return; }; @@ -1000,7 +1003,9 @@ impl Game<'_> { host.states = states; } self.lan_flush_effects(&mut host); - self.tick_guests(&mut host); + if !paused { + self.tick_guests(&mut host); + } self.lan_living_flags(&mut host); self.tick_server_travel(&mut host); self.lan_swings(&mut host); diff --git a/crates/horizon-client/src/game/levels.rs b/crates/horizon-client/src/game/levels.rs index 895cda08c..114ee928f 100644 --- a/crates/horizon-client/src/game/levels.rs +++ b/crates/horizon-client/src/game/levels.rs @@ -296,7 +296,7 @@ impl Game<'_> { self.update_dedicated_streaming(); self.update_world(); result = if paused { - self.tick_lan(); + self.tick_lan(true); Ok(()) } else if k == 0 { self.tick() diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index e3eed3f55..32cffa306 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -3175,10 +3175,7 @@ impl Game<'_> { f64::from(head[2]) + 0.5, ); player.velocity = Vec3::ZERO; - } else if !dead && !riding && !self.pause { - // Minecraft.tick skips the level while the game is paused: the window's own - // copy stands still too, so air, hunger and fall prediction do not run ahead - // of the paused server (#1592). + } else if !dead && !riding { player.velocity = player.velocity.add_vector(pushed); MotionWorld { entities: &entity_collisions,