Merge pull request #2674 from kacpherek/fix/air-bubbles-eye-height

🤖 Agent: Proven in union R1 (branch union/cg19-r1, main + 83 of kacpherek's PRs): the 98 harnesses it can affect, clippy -D warnings, tests, lan_e2e in-frame and on the server thread.
This commit is contained in:
Ludovic Marie
2026-10-27 15:08:38 +01:00
committed by GitHub
+3 -11
View File
@@ -5769,17 +5769,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,