From 508cb2df9fcd98ea3ca1189f58b8c5fbf888aea7 Mon Sep 17 00:00:00 2001 From: Alexander Krylov Date: Sat, 24 Oct 2026 23:01:31 +0300 Subject: [PATCH] Fish: the window tracks the fluid contact of the mobs it only displays `m.fluids` is filled by `Mob::update_fluids`, which only runs in the mob tick on the server. A window that is a client of a server never runs that tick, so every mob it draws kept the default `Fluids { in_water: false }` for its whole life. Cod, salmon and tropical fish rotate onto their side while `!in_water` (`mobs/aquatic.rs`), so they were drawn lying on their flank in water, while their position and heading, which come from the server, looked correct (#1591). `tick_remote_entities` now runs vanilla's `EntityFluidInteraction.update` for the displayed mobs before it ticks their animations, so the renderers read the water contact the same way they do for a mob the window simulates itself. Fixes #1591. Co-Authored-By: Hermes Agent (Nous Research) --- crates/horizon-client/src/game/remote.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index 32cffa306..e166ff444 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -3325,6 +3325,19 @@ impl Game<'_> { /// ClientLevel.tickEntities; a frozen level only ticks the players /// (`TickRateManager.isEntityFrozen`). fn tick_remote_entities(&mut self, running: bool) { + // EntityFluidInteraction.update for the entities this window only displays: the + // server never sends the fluid contact, and the renderers read it (cod, salmon and + // tropical fish lie on their side without `in_water`, #1591). + let fluids: Vec<_> = { + let w = self.mob_world_base(&[]); + self.mobs + .iter() + .map(|m| w.fluids(m.bounds(), m.eye_y())) + .collect() + }; + for (m, fluids) in self.mobs.iter_mut().zip(fluids) { + m.fluids = fluids; + } let Some(r) = self.remote.as_mut() else { return; };