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 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-25 09:36:54 +01:00
parent 6240124557
commit 0d18ff7ca7
+3 -1
View File
@@ -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