From 6240124557c9f12f2dfaba4c9cb4636919d616a9 Mon Sep 17 00:00:00 2001 From: rdbtCVS <87152661+rdbtCVS@users.noreply.github.com> Date: Sun, 25 Oct 2026 01:21:59 +0100 Subject: [PATCH 1/2] Slow Falling clears the fall distance so landing does not hurt The effect capped downward gravity but left the fall distance to accumulate, so the landing tick still dealt fall damage. Clear it at the start of check_fall_damage, where both local travel and the server thread's replay of a guest's move pass. Co-Authored-By: opencode (deepseek-v4.1-flash-free) --- crates/horizon-client/src/motion.rs | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/crates/horizon-client/src/motion.rs b/crates/horizon-client/src/motion.rs index 0a626b1e7..5f91fee3a 100644 --- a/crates/horizon-client/src/motion.rs +++ b/crates/horizon-client/src/motion.rs @@ -1753,6 +1753,9 @@ impl EntityMoveWorld for MotionWorld<'_, '_, '_> { state: BlockStateId, position: BlockPos, ) -> Result<()> { + if self.player.status.slow_falling { + self.player.fall_distance = 0.0; + } if self.player.spawn_extra_particles_on_fall && grounded && self.player.fall_distance > 0.0 { self.player.events.push(MotionEvent::SmashLanding { @@ -2861,6 +2864,46 @@ mod tests { } } #[test] + fn slow_falling_clears_the_fall_distance_so_landing_does_not_hurt() { + let root = Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../../.local/horizon-client") + .join(horizon_core::VANILLA_VERSION); + if !root.join("movement-properties.nbt").exists() { + return; + } + let assets = Assets::load(&root).unwrap(); + let render = assets.reload(&root).unwrap(); + let binding = crate::collisions::load(&root, assets.registry).unwrap(); + let resources = MotionResources::load(&root, &assets).unwrap(); + for slow_falling in [false, true] { + let mut scene = World::test_scene(&assets, &render, 2).unwrap(); + let mut player = PlayerMotion::new(&resources, Vec3::new(20.5, 9.0, 20.5)).unwrap(); + player.fall_distance = 30.0; + player.status.slow_falling = slow_falling; + let mut w = MotionWorld { + entities: &[], + player: &mut player, + scene: &mut scene, + assets: &assets, + collision_binding: &binding, + resources: &resources, + }; + for _ in 0..200 { + if w.player.ground.on_ground { + break; + } + w.player_movement_tick([0.0, 0.0], false).unwrap(); + } + assert!(w.player.ground.on_ground); + if slow_falling { + assert_eq!(w.player.health.health(), 20.0); + assert_eq!(w.player.fall_distance, 0.0); + } else { + assert!(w.player.health.health() < 20.0); + } + } + } + #[test] fn a_riptide_spin_lies_flat_and_ends_on_the_first_entity_it_touches() { let root = Path::new(env!("CARGO_MANIFEST_DIR")) .join("../../.local/horizon-client") From 0d18ff7ca7f563e775cc7abf13b9f9c02135851d Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sun, 25 Oct 2026 09:36:54 +0100 Subject: [PATCH 2/2] Fall distance: Levitation resets it too, as LivingEntity.aiStep does aiStep calls resetFallDistance under either Slow Falling or Levitation. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/motion.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/motion.rs b/crates/horizon-client/src/motion.rs index 5f91fee3a..da2d3a51e 100644 --- a/crates/horizon-client/src/motion.rs +++ b/crates/horizon-client/src/motion.rs @@ -1753,7 +1753,9 @@ impl EntityMoveWorld for MotionWorld<'_, '_, '_> { state: BlockStateId, position: BlockPos, ) -> Result<()> { - if self.player.status.slow_falling { + // LivingEntity.aiStep: Slow Falling and Levitation reset the fall + // distance every tick, so landing under either does not hurt. + if self.player.status.slow_falling || self.player.status.levitation.is_some() { self.player.fall_distance = 0.0; } if self.player.spawn_extra_particles_on_fall && grounded && self.player.fall_distance > 0.0