From dca3bb89fe37a9a24b815eb75902767fac4e8d80 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Tue, 27 Oct 2026 06:32:01 +0100 Subject: [PATCH] Show the air bubbles only when the eyes are below the water surface --- crates/horizon-client/src/game.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 7699e83d7..929a968c8 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -5495,17 +5495,9 @@ impl Game<'_> { } else { hud_layout::HeartKind::Normal }; - let eye = p.position.y + f64::from(p.dimensions.eye_height); - let under_water = self - .res - .facts() - .get(self.world.block( - p.position.x.floor() as i32, - eye.floor() as i32, - p.position.z.floor() as i32, - )) - .fluid - == horizon_client::blocks::Fluid::Water; + // Hud.extractAirBubbles: `isEyeInFluidMatching`, so the eyes are below + // the surface, not merely in the water block. + let under_water = p.is_eye_in_fluid(horizon_client::motion::WATER); let inputs = hud_layout::HealthInputs { tick: self.ticks as i32, millis: self.started.elapsed().as_millis() as i64,