From a1b32304a35cd8c56d8542b374e4ab4d3d1ea1af Mon Sep 17 00:00:00 2001 From: iLostName <55976057+iLostName@users.noreply.github.com> Date: Wed, 28 Oct 2026 06:09:22 +0100 Subject: [PATCH] boat: the view stops at 105 degrees at every turn, so it doesn't jitter Fixes #2983. --- crates/horizon-client/src/game.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index c97af3a47..5a6ca8c17 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -5613,6 +5613,16 @@ impl Game<'_> { rotation.turn(xo * zoom, yo * zoom); self.yaw = rotation.y_rot; self.pitch = rotation.x_rot; + // Entity.turn ends in AbstractBoat.onPassengerTurned: clampRotation + // keeps the view within 105 degrees of the boat at every turn, not + // only at the tick, so it never swings past and back. + if let Some(b) = self + .riding + .and_then(|id| self.boats.iter().find(|b| b.id == id)) + { + let delta = (self.yaw - b.yaw + 180.0).rem_euclid(360.0) - 180.0; + self.yaw += delta.clamp(-105.0, 105.0) - delta; + } } } /// `Minecraft.pause`: a single-player game with a pausing screen open.